package cc.smtweb.framework.core.mvc.controller.binder.param;


public class LongEditor extends AbstractNumberEditor {
    private static final Long LONG_ZERO = 0L;

    public LongEditor(int header, boolean automicType) {
        super(header, automicType);
    }

    @Override
    protected Object convert(Number value) {
        return value.longValue();
    }

    @Override
    protected Object getValue(String text) {
        return Long.valueOf(text);
    }

    @Override
    protected Object defaultValue() {
        return LONG_ZERO;
    }
}
