Class DecimalValue

All Implemented Interfaces:
Comparable<XPathComparable>, Iterable<AtomicValue>, AtomicMatchKey, XPathComparable, AtomicSequence, GroundedValue, IdentityComparable, Item, Sequence, ConversionResult, ContextFreeAtomicValue
Direct Known Subclasses:
BigDecimalValue, IntegerValue

public abstract class DecimalValue extends NumericValue
Abstract class representing the XDM type xs:decimal. An instance of xs:decimal that is also an instance of xs:integer will be implemented as an instance of IntegerValue; every other xs:decimal will be implemented as an instance of BigDecimalValue.
Since:
9.8: in previous releases, the concrete class BigDecimalValue was named DecimalValue, and its instances did not include integers. The new hierarchy is designed to reflect the XDM type hierarchy more faithfully
  • Constructor Details Link icon

    • DecimalValue Link icon

      public DecimalValue(AtomicType typeLabel)
  • Method Details Link icon

    • getDecimalValue Link icon

      public abstract BigDecimal getDecimalValue()
      Implementations of Decimal value don't throw an exception when converted to BigDecimal
      Specified by:
      getDecimalValue in class NumericValue
      Returns:
      the BigDecimal representation of the value