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

public class ByteEditor extends AbstractNumberEditor {
    private static final Byte BYTE_ZERO = 0;

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

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

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

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