Class XSDDouble

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

    public class XSDDouble
    extends java.lang.Object
    implements Datatype<java.lang.Double>

    Title: xsd:double

    Description: Singleton implementation of xsd:double datatype

    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
      RestrictedDatatype<java.lang.Double> asDataRange()
      Get the canonical _data range for a datatype
      boolean equals​(java.lang.Object obj)  
      openllet.aterm.ATermAppl getCanonicalRepresentation​(openllet.aterm.ATermAppl input)
      Get the canonical representation of a lexical form
      static XSDDouble getInstance()  
      openllet.aterm.ATermAppl getLiteral​(java.lang.Object value)
      Get the canonical ATermAppl literal representation for a value space object.
      openllet.aterm.ATermAppl getName()
      Get the datatype identifier
      Datatype<?> getPrimitiveDatatype()
      Get the primitive datatype associated with this datatype.
      java.lang.Double getValue​(openllet.aterm.ATermAppl literal)
      Get the Java object representation of a _data value
      int hashCode()  
      boolean isPrimitive()
      Check if a datatype is primitive.
      • Methods inherited from class java.lang.Object

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

      • getInstance

        public static XSDDouble getInstance()
      • asDataRange

        public RestrictedDatatype<java.lang.Double> asDataRange()
        Description copied from interface: Datatype
        Get the canonical _data range for a datatype
        Specified by:
        asDataRange in interface Datatype<java.lang.Double>
        Returns:
        a DataRange representation of the datatype value space
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getCanonicalRepresentation

        public openllet.aterm.ATermAppl getCanonicalRepresentation​(openllet.aterm.ATermAppl input)
                                                            throws InvalidLiteralException
        Description copied from interface: Datatype
        Get the canonical representation of a lexical form
        Specified by:
        getCanonicalRepresentation in interface Datatype<java.lang.Double>
        Parameters:
        input - a lexical form of the literal
        Returns:
        the canonical representation of the lexical form
        Throws:
        InvalidLiteralException - if input is invalid
      • getLiteral

        public openllet.aterm.ATermAppl getLiteral​(java.lang.Object value)
        Description copied from interface: Datatype
        Get the canonical ATermAppl literal representation for a value space object. This may be unsupported by datatypes for which Datatype.isPrimitive() returns false.
        Specified by:
        getLiteral in interface Datatype<java.lang.Double>
        Parameters:
        value - Element of the value space for some datatype
        Returns:
        The ATermAppl representation of value
      • getName

        public openllet.aterm.ATermAppl getName()
        Description copied from interface: Datatype
        Get the datatype identifier
        Specified by:
        getName in interface Datatype<java.lang.Double>
        Returns:
        ATermAppl of URI for datatype
      • getPrimitiveDatatype

        public Datatype<?> getPrimitiveDatatype()
        Description copied from interface: Datatype
        Get the primitive datatype associated with this datatype.
        Specified by:
        getPrimitiveDatatype in interface Datatype<java.lang.Double>
        Returns:
        this if isPrimitive() == true, else a primitive datatype that is a superset of the value space of this datatype.
      • getValue

        public java.lang.Double getValue​(openllet.aterm.ATermAppl literal)
                                  throws InvalidLiteralException
        Description copied from interface: Datatype
        Get the Java object representation of a _data value
        Specified by:
        getValue in interface Datatype<java.lang.Double>
        Parameters:
        literal - the literal
        Returns:
        the Java object representation of the lexical form
        Throws:
        InvalidLiteralException - if literal is invalid
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: Datatype
        Check if a datatype is primitive. All datatypes are either primitive or derived. Derived datatypes are names for subsets of the value spaces of primitive datatypes, defined using specific constraining facet values.
        Specified by:
        isPrimitive in interface Datatype<java.lang.Double>
        Returns:
        true if the datatype is primitive, false else