Package com.nexirius.util.simpletype

Examples of com.nexirius.util.simpletype.SimpleType_double


     * Creates a new instance and initialises its value
     *
     * @param value The initial value.
     */
    public DoubleModel(double value) {
        super(new SimpleType_double(value));
    }
View Full Code Here


     *
     * @param value     The initial value.
     * @param fieldName The initial field name
     */
    public DoubleModel(double value, String fieldName) {
        super(new SimpleType_double(value), fieldName);
    }
View Full Code Here

    /**
     * Set the value as double
     */
    public void setDouble(double i) {
        setFlag(ModelFlag.EMPTY, false);
        setValue(new SimpleType_double(i));
    }
View Full Code Here

        if (text.length() == 0) {
            setDouble(0.0);
            setFlag(ModelFlag.EMPTY, true);
        } else {
            if (format == null) {
                setValue(new SimpleType_double(text));
            } else {
                try {
                    ParsePosition pos = new ParsePosition(0);

                    setValue(new SimpleType_double(format.parse(text, pos).doubleValue()));

                    if (pos.getIndex() != text.length()) {
                        throw new Exception();
                    }
                } catch (Exception ex) {
                    setValue(new SimpleType_double(text));
                }
            }

            setFlag(ModelFlag.EMPTY, false);
        }
View Full Code Here

TOP

Related Classes of com.nexirius.util.simpletype.SimpleType_double

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.