Package javolution.text

Examples of javolution.text.CharArray.toDouble()


         *         the default value if the attribute is not found.
         */
        public double getAttribute(String name, double defaultValue)
                throws XMLStreamException {
            CharArray value = getAttribute(name);
            return (value != null) ? value.toDouble() : defaultValue;
        }

        /**
         * Returns the attribute of same type as the specified
         * default value. The default value
View Full Code Here


         *         the default value if the attribute is not found.
         */
        public double getAttribute(String name, double defaultValue)
                throws XMLStreamException {
            CharArray value = getAttribute(name);
            return (value != null) ? value.toDouble() : defaultValue;
        }

        /**
         * Returns the attribute of same type as the specified
         * default value.
View Full Code Here

        return value != null ? Float.valueOf( value.toFloat() ) : defaultValue;
    }

    private Double getAttribute( final InputElement input, final String name, final Double defaultValue ) throws XMLStreamException {
        final CharArray value = input.getAttribute( name );
        return value != null ? Double.valueOf( value.toDouble() ) : defaultValue;
    }

    private Byte getAttribute( final InputElement input, final String name, final Byte defaultValue ) throws XMLStreamException {
        final CharArray value = input.getAttribute( name );
        return value != null ? Byte.valueOf( TypeFormat.parseByte( value ) ) : defaultValue;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.