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


public class FloatEditor extends AbstractNumberEditor {
    private static final Float FLOAT_ZERO = 0.0f;

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

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

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

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