org.deri.iris.terms.concrete
Class DecimalTerm

java.lang.Object
  extended by org.deri.iris.terms.concrete.AbstractNumericTerm
      extended by org.deri.iris.terms.concrete.DecimalTerm
All Implemented Interfaces:
Comparable<ITerm>, IDecimalTerm, IConcreteTerm, INumericTerm, ITerm
Direct Known Subclasses:
IntegerTerm

public class DecimalTerm
extends AbstractNumericTerm
implements IDecimalTerm

Simple implementation of IDecimalTerm.


Field Summary
protected  BigDecimal value
           
 
Fields inherited from interface org.deri.iris.api.terms.concrete.IDecimalTerm
DATATYPE_URI
 
Method Summary
 URI getDatatypeIRI()
          Returns the fully qualified identifier for the data type corresponding to this term.
 BigDecimal getValue()
          Returns the value of this numeric term represented as a BigDecimal.
 boolean isNegativeInfinity()
          Returns true if this numeric term represents negative infinity, false otherwise.
 boolean isNotANumber()
          Returns true if this numeric term represents a "NaN" value, false otherwise.
 boolean isPositiveInfinity()
          Returns true if this numeric term represents positive infinity, false otherwise.
 
Methods inherited from class org.deri.iris.terms.concrete.AbstractNumericTerm
compareTo, equals, hashCode, isGround, toCanonicalString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deri.iris.api.terms.IConcreteTerm
toCanonicalString
 
Methods inherited from interface org.deri.iris.api.terms.ITerm
isGround
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

value

protected final BigDecimal value
Method Detail

getValue

public BigDecimal getValue()
Description copied from interface: INumericTerm
Returns the value of this numeric term represented as a BigDecimal.

Specified by:
getValue in interface INumericTerm
Specified by:
getValue in interface ITerm
Returns:
The BigDecimal representing the value of this numeric term, or null if this term represents "NaN", positive infinity or negative infinity.

getDatatypeIRI

public URI getDatatypeIRI()
Description copied from interface: IConcreteTerm
Returns the fully qualified identifier for the data type corresponding to this term. For instance, a terms representing a double data type should return the URI "http://www.w3.org/2001/XMLSchema#double".

Specified by:
getDatatypeIRI in interface IConcreteTerm
Returns:
The fully qualified identifier for the data type corresponding to this term.

isNotANumber

public boolean isNotANumber()
Description copied from interface: INumericTerm
Returns true if this numeric term represents a "NaN" value, false otherwise.

Specified by:
isNotANumber in interface INumericTerm
Returns:
true if this numeric term represents a "NaN" value, false otherwise

isPositiveInfinity

public boolean isPositiveInfinity()
Description copied from interface: INumericTerm
Returns true if this numeric term represents positive infinity, false otherwise.

Specified by:
isPositiveInfinity in interface INumericTerm
Returns:
true if this numeric term represents positive infinity, false otherwise.

isNegativeInfinity

public boolean isNegativeInfinity()
Description copied from interface: INumericTerm
Returns true if this numeric term represents negative infinity, false otherwise.

Specified by:
isNegativeInfinity in interface INumericTerm
Returns:
true if this numeric term represents negative infinity, false otherwise.