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


public class DoubleEditor extends AbstractNumberEditor {
    private static final Double DOUBLE_ZERO = 0.0d;

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

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

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

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