org.deri.iris.api.terms
Interface INumericTerm

All Superinterfaces:
Comparable<ITerm>, IConcreteTerm, ITerm
All Known Subinterfaces:
IByteTerm, IDecimalTerm, IDoubleTerm, IFloatTerm, IIntegerTerm, IIntTerm, ILongTerm, INegativeInteger, INonNegativeInteger, INonPositiveInteger, IPositiveInteger, IShortTerm, IUnsignedByte, IUnsignedInt, IUnsignedLong, IUnsignedShort
All Known Implementing Classes:
AbstractNumericTerm, ByteTerm, DecimalTerm, DoubleTerm, FloatTerm, IntegerTerm, IntTerm, LongTerm, NegativeInteger, NonNegativeInteger, NonPositiveInteger, PositiveInteger, ShortTerm, UnsignedByte, UnsignedInt, UnsignedLong, UnsignedShort

public interface INumericTerm
extends IConcreteTerm

An interface for representing a numeric term. A numeric term is a constant term which represents a number.


Method Summary
 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 interface org.deri.iris.api.terms.IConcreteTerm
getDatatypeIRI, toCanonicalString
 
Methods inherited from interface org.deri.iris.api.terms.ITerm
isGround
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getValue

BigDecimal getValue()
Returns the value of this numeric term represented as a BigDecimal.

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.

isNotANumber

boolean isNotANumber()
Returns true if this numeric term represents a "NaN" value, false otherwise.

Returns:
true if this numeric term represents a "NaN" value, false otherwise

isPositiveInfinity

boolean isPositiveInfinity()
Returns true if this numeric term represents positive infinity, false otherwise.

Returns:
true if this numeric term represents positive infinity, false otherwise.

isNegativeInfinity

boolean isNegativeInfinity()
Returns true if this numeric term represents negative infinity, false otherwise.

Returns:
true if this numeric term represents negative infinity, false otherwise.