## org.exist.xquery.value
Class NumericValue

    java.lang.Object
      org.exist.xquery.value.AtomicValue
          org.exist.xquery.value.ComputableValue
              org.exist.xquery.value.NumericValue

All Implemented Interfaces:
  java.lang.Comparable, Indexable, Item, Sequence

Direct Known Subclasses:
  DecimalValue, DoubleValue, FloatValue, IntegerValue

public abstract class NumericValue
extends ComputableValue

Field Summary

Fields inherited from class org.exist.xquery.value.AtomicValue
`EMPTY_VALUE`

Fields inherited from interface org.exist.xquery.value.Sequence
`EMPTY_SEQUENCE`

Constructor Summary
`NumericValue()`

Method Summary
`abstract NumericValue` `abs()`
`abstract NumericValue` `ceiling()`
`int` `compareTo(java.text.Collator collator, AtomicValue other)`
`boolean` `compareTo(java.text.Collator collator, int operator, AtomicValue other)`
`abstract AtomicValue` `convertTo(int requiredType)` Convert this item into an atomic value, whose type corresponds to the specified target type.
`abstract NumericValue` `floor()`
`double` `getDouble()`
`int` `getInt()`
`long` `getLong()`
`abstract java.lang.String` `getStringValue()` Return the string value of this item (see the definition of string value in XPath).
`abstract IntegerValue` `idiv(NumericValue other)`
`boolean` `isInfinite()`
`boolean` `isNaN()`
`abstract AtomicValue` `max(java.text.Collator collator, AtomicValue other)`
`abstract AtomicValue` `min(java.text.Collator collator, AtomicValue other)`
`abstract NumericValue` `mod(NumericValue other)`
`abstract NumericValue` `negate()`
`abstract NumericValue` `round()`
`abstract NumericValue` `round(IntegerValue precision)`

Methods inherited from class org.exist.xquery.value.ComputableValue
`div, minus, mult, plus`

Methods inherited from class org.exist.xquery.value.AtomicValue

`add, addAll, atomize, clearContext, compareTo, contains, conversionPreference, copyTo, deserialize, dump, effectiveBooleanValue, endsWith, getCardinality, getDocumentSet, getItemType, getLength, getType, hasMany, hasOne, isCached, isEmpty, isPersistentSet, itemAt, iterate, promote, removeDuplicates, serialize, serializeValue, setIsCached, setSelfAsContext, startsWith, toJavaObject, toNodeSet, toSAX, toSequence, toString, unorderedIterator`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NumericValue

    public NumericValue()

Method Detail

### getStringValue

    public abstract java.lang.String getStringValue()
                                             throws XPathException

  Description copied from interface: `Item`
  Return the string value of this item (see the definition of string value in XPath).

  Specified by:
    `getStringValue` in interface `Item`
  Specified by:
    `getStringValue` in class `ComputableValue`
  Throws:
    `XPathException`

### convertTo

    public abstract AtomicValue convertTo(int requiredType)
                                   throws XPathException

  Description copied from interface: `Item`
  Convert this item into an atomic value, whose type corresponds to the specified target type. requiredType should be one of the type constants defined in `Type`. An `XPathException` is thrown if the conversion is impossible.

  Specified by:
    `convertTo` in interface `Item`
  Specified by:
    `convertTo` in class `ComputableValue`
  Throws:
    `XPathException`

### getDouble

    public double getDouble()
                     throws XPathException

  Throws:
    `XPathException`

### getLong

    public long getLong()
                 throws XPathException

  Throws:
    `XPathException`

### getInt

    public int getInt()
               throws XPathException

  Throws:
    `XPathException`

### isNaN

    public boolean isNaN()

### isInfinite

    public boolean isInfinite()

### compareTo

    public boolean compareTo(java.text.Collator collator,
                             int operator,
                             AtomicValue other)
                      throws XPathException

  Specified by:
    `compareTo` in class `ComputableValue`
  Throws:
    `XPathException`

### compareTo

    public int compareTo(java.text.Collator collator,
                         AtomicValue other)
                  throws XPathException

  Specified by:
    `compareTo` in class `ComputableValue`
  Throws:
    `XPathException`

### negate

    public abstract NumericValue negate()
                                 throws XPathException

  Throws:
    `XPathException`

### ceiling

    public abstract NumericValue ceiling()
                                  throws XPathException

  Throws:
    `XPathException`

### floor

    public abstract NumericValue floor()
                                throws XPathException

  Throws:
    `XPathException`

### round

    public abstract NumericValue round()
                                throws XPathException

  Throws:
    `XPathException`

### round

    public abstract NumericValue round(IntegerValue precision)
                                throws XPathException

  Throws:
    `XPathException`

### mod

    public abstract NumericValue mod(NumericValue other)
                              throws XPathException

  Throws:
    `XPathException`

### idiv

    public abstract IntegerValue idiv(NumericValue other)
                               throws XPathException

  Throws:
    `XPathException`

### abs

    public abstract NumericValue abs()
                              throws XPathException

  Throws:
    `XPathException`

### max

    public abstract AtomicValue max(java.text.Collator collator,
                                    AtomicValue other)
                             throws XPathException

  Specified by:
    `max` in class `ComputableValue`
  Throws:
    `XPathException`

### min

    public abstract AtomicValue min(java.text.Collator collator,
                                    AtomicValue other)
                             throws XPathException

  Specified by:
    `min` in class `ComputableValue`
  Throws:
    `XPathException`

Copyright (C) Wolfgang Meier. All rights reserved.