Class DoubleValue

  • All Implemented Interfaces:
    Comparable<DoubleValue>, AttributeValue, PrimitiveValue, Value

    public final class DoubleValue
    extends NumericValue<Double,​DoubleValue>
    implements Comparable<DoubleValue>
    Representation of an xs:double value. This class supports parsing xs:double values. All objects of this class are immutable and all methods of the class are thread-safe. The choice of the Java type Double is based on JAXB schema-to-Java mapping spec: https://docs.oracle.com/javase/tutorial/jaxb/intro/bind.html
    Version:
    $Id: $
    • Field Detail

      • ZERO

        public static final DoubleValue ZERO
        Value zero
    • Constructor Detail

      • DoubleValue

        public DoubleValue​(Double value)
        Creates a new DoubleAttributeValue that represents the double value supplied.
        Parameters:
        value - the double value to be represented
      • DoubleValue

        public DoubleValue​(String val)
                    throws NumberFormatException
        Creates instance from string according to xsd:double definition
        Parameters:
        val - A string containing lexical representation of xsd:double
        Throws:
        NumberFormatException - val is not a valid string representation of a double value