Class IEEEDoubleType

  • All Implemented Interfaces:
    FloatingPointType<java.lang.Double>

    public class IEEEDoubleType
    extends java.lang.Object
    implements FloatingPointType<java.lang.Double>

    Title: IEEE Double Type

    Description: Implementation of FloatingPointType to support xsd:double

    Copyright: Copyright (c) 2009

    Company: Clark & Parsia, LLC.

    Author:
    Mike Smith
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double cast​(java.lang.Object o)
      Casts an object to the class described by this FloatingPointType object.
      java.lang.Double decrement​(java.lang.Double n)  
      static IEEEDoubleType getInstance()  
      java.lang.Double getNaN()
      Gets the Not-a-Number constant for the type.
      java.lang.Double getNegativeInfinity()
      Gets the negative infinity constant for the type.
      java.lang.Double getPositiveInfinity()
      Gets the positive infinity constant for the type.
      java.lang.Double increment​(java.lang.Double n)  
      java.lang.Number intervalSize​(java.lang.Double lower, java.lang.Double upper)
      Count the number of floating point values in an inclusive interval
      boolean isInstance​(java.lang.Object o)
      Determine if the specified Object is assignment compatible with the object represented by this FloatingPointType.
      boolean isNaN​(java.lang.Double f)
      Returns true if this floating point value is a Not-a-Number (NaN) value, false otherwise.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cast

        public java.lang.Double cast​(java.lang.Object o)
        Description copied from interface: FloatingPointType
        Casts an object to the class described by this FloatingPointType object.
        Specified by:
        cast in interface FloatingPointType<java.lang.Double>
        Parameters:
        o - the object to cast
        Returns:
        o in the appropriate type
      • decrement

        public java.lang.Double decrement​(java.lang.Double n)
        Specified by:
        decrement in interface FloatingPointType<java.lang.Double>
        Parameters:
        n - The value to decrement Return the next floating point value in the direction of -Inf.
        Returns:
        If n > -Inf, the next floating point value in the direction of -Inf. If n == -Inf, -Inf.
      • getNaN

        public java.lang.Double getNaN()
        Description copied from interface: FloatingPointType
        Gets the Not-a-Number constant for the type.
        Specified by:
        getNaN in interface FloatingPointType<java.lang.Double>
        Returns:
        T.NaN
      • getNegativeInfinity

        public java.lang.Double getNegativeInfinity()
        Description copied from interface: FloatingPointType
        Gets the negative infinity constant for the type.
        Specified by:
        getNegativeInfinity in interface FloatingPointType<java.lang.Double>
        Returns:
        T.NEGATIVE_INFINITY
      • getPositiveInfinity

        public java.lang.Double getPositiveInfinity()
        Description copied from interface: FloatingPointType
        Gets the positive infinity constant for the type.
        Specified by:
        getPositiveInfinity in interface FloatingPointType<java.lang.Double>
        Returns:
        T.POSITIVE_INFINITY
      • increment

        public java.lang.Double increment​(java.lang.Double n)
        Specified by:
        increment in interface FloatingPointType<java.lang.Double>
        Parameters:
        n - The value to increment Return the next floating point value in the direction of +Inf.
        Returns:
        If n < +Inf, the next floating point value in the direction of +Inf. If n == +Inf, +Inf.
      • intervalSize

        public java.lang.Number intervalSize​(java.lang.Double lower,
                                             java.lang.Double upper)
        Description copied from interface: FloatingPointType
        Count the number of floating point values in an inclusive interval
        Specified by:
        intervalSize in interface FloatingPointType<java.lang.Double>
        Parameters:
        lower - The lower bound of the interval
        upper - The upper bound of the interval
        Returns:
        If lower.equals(upper), 1. Else, the number of floating point values between lower and upper plus 2
      • isInstance

        public boolean isInstance​(java.lang.Object o)
        Description copied from interface: FloatingPointType
        Determine if the specified Object is assignment compatible with the object represented by this FloatingPointType. Typically implemented as a wrapper for T.class.isInstance(Object).
        Specified by:
        isInstance in interface FloatingPointType<java.lang.Double>
        Parameters:
        o - the object to check
        Returns:
        true if o is an instance of T, false else.
      • isNaN

        public boolean isNaN​(java.lang.Double f)
        Description copied from interface: FloatingPointType
        Returns true if this floating point value is a Not-a-Number (NaN) value, false otherwise.
        Specified by:
        isNaN in interface FloatingPointType<java.lang.Double>
        Parameters:
        f - the value to be tested
        Returns:
        true if the argument is NaN, else false