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


public class ShortEditor extends AbstractNumberEditor {
    private static final Short SHORT_ZERO = 0;

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

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

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

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