Package javolution.text

Examples of javolution.text.CharArray.toFloat()


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

        /**
         * Returns the specified <code>double</code> attribute.
         *
 
View Full Code Here


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

        /**
         * Returns the specified <code>double</code> attribute.
         *
 
View Full Code Here

        return value != null ? Short.valueOf( TypeFormat.parseShort( value ) ) : defaultValue;
    }

    private Float getAttribute( final InputElement input, final String name, final Float defaultValue ) throws XMLStreamException {
        final CharArray value = input.getAttribute( name );
        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;
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.