Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.xquery.value
Class IntegerValue

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

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

public class IntegerValue
extends NumericValue

[Definition:] integer is derived from decimal by fixing the value of fractionDigits to be 0. This results in the standard mathematical concept of the integer numbers. The value space of integer is the infinite set {...,-2,-1,0,1,2,...}. The base type of integer is decimal. cf http://www.w3.org/TR/xmlschema-2/#integer

Field Summary
`static IntegerValue` | `ZERO`

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

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

Constructor Summary
`IntegerValue(java.math.BigInteger integer)`
`IntegerValue(java.math.BigInteger value, int requiredType)`
`IntegerValue(long value)`
`IntegerValue(long value, int type)`
`IntegerValue(java.lang.String stringValue)`
`IntegerValue(java.lang.String stringValue, int requiredType)`

Method Summary
`NumericValue` | `abs()`
`NumericValue` | `ceiling()`
`int` | `compareTo(java.lang.Object o)`
`int` | `conversionPreference(java.lang.Class javaClass)` Returns a preference indicator, indicating the preference of a value to be converted into the given Java class.
`AtomicValue` | `convertTo(int requiredType)` Convert this item into an atomic value, whose type corresponds to the specified target type.
`ComputableValue` | `div(ComputableValue other)` The div operator performs floating-point division according to IEEE 754.
`boolean` | `effectiveBooleanValue()` Get the effective boolean value of this sequence.
`NumericValue` | `floor()`
`double` | `getDouble()`
`int` | `getInt()`
`long` | `getLong()`
`java.lang.String` | `getStringValue()` Return the string value of this item (see the definition of string value in XPath).
`int` | `getType()` Return the type of this item according to the type constants defined in class `Type`.
`long` | `getValue()`
`IntegerValue` | `idiv(NumericValue other)`
`Item` | `itemAt(int pos)` Returns the item located at the specified position within this sequence.
`AtomicValue` | `max(java.text.Collator collator, AtomicValue other)`
`AtomicValue` | `min(java.text.Collator collator, AtomicValue other)`
`ComputableValue` | `minus(ComputableValue other)`
`NumericValue` | `mod(NumericValue other)`
`ComputableValue` | `mult(ComputableValue other)`
`NumericValue` | `negate()`
`ComputableValue` | `plus(ComputableValue other)`
`NumericValue` | `round()`
`NumericValue` | `round(IntegerValue precision)`
`void` | `setValue(long value)`
`java.lang.Object` | `toJavaObject(java.lang.Class target)` Convert the value into an instance of the specified Java class.

Methods inherited from class org.exist.xquery.value.NumericValue
`compareTo, compareTo, isInfinite, isNaN`

Methods inherited from class org.exist.xquery.value.AtomicValue
`add, addAll, atomize, clearContext, contains, copyTo, deserialize, dump, endsWith, getCardinality, getDocumentSet, getItemType, getLength, hasMany, hasOne, isCached, isEmpty, isPersistentSet, iterate, promote, removeDuplicates, serialize, serializeValue, setIsCached, setSelfAsContext, startsWith, toNodeSet, toSAX, toSequence, toString, unorderedIterator`

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

Field Detail

### ZERO

    public static final IntegerValue ZERO

Constructor Detail

### IntegerValue

    public IntegerValue(long value)

### IntegerValue

    public IntegerValue(long value,
                        int type)
                 throws XPathException

### IntegerValue

    public IntegerValue(java.lang.String stringValue)
                 throws XPathException

### IntegerValue

    public IntegerValue(java.lang.String stringValue,
                        int requiredType)
                 throws XPathException

### IntegerValue

    public IntegerValue(java.math.BigInteger value,
                        int requiredType)

Parameters:
  `value` -
  `requiredType` -

### IntegerValue

    public IntegerValue(java.math.BigInteger integer)

Parameters:
  `integer` -

Method Detail

### getType

    public int getType()

  Description copied from interface: `Item`
  Return the type of this item according to the type constants defined in class `Type`.

  Specified by:
    `getType` in interface `Item`
  Overrides:
    `getType` in class `AtomicValue`

### itemAt

    public Item itemAt(int pos)

  Description copied from interface: `Sequence`
  Returns the item located at the specified position within this sequence. Items are counted beginning at 0.

  Specified by:
    `itemAt` in interface `Sequence`
  Overrides:
    `itemAt` in class `AtomicValue`

### getValue

    public long getValue()

### setValue

    public void setValue(long value)

### getStringValue

    public java.lang.String getStringValue()

  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 `NumericValue`

### convertTo

    public 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 `NumericValue`
  Throws:
    `XPathException`

### getInt

    public int getInt()
               throws XPathException

  Overrides:
    `getInt` in class `NumericValue`
  Throws:
    `XPathException`

### getLong

    public long getLong()
                 throws XPathException

  Overrides:
    `getLong` in class `NumericValue`
  Throws:
    `XPathException`

### getDouble

    public double getDouble()
                     throws XPathException

  Overrides:
    `getDouble` in class `NumericValue`
  Throws:
    `XPathException`

### effectiveBooleanValue

    public boolean effectiveBooleanValue()
                                  throws XPathException

  Description copied from interface: `Sequence`
  Get the effective boolean value of this sequence. Will be false if the sequence is empty, true otherwise.

  Specified by:
    `effectiveBooleanValue` in interface `Sequence`
  Overrides:
    `effectiveBooleanValue` in class `AtomicValue`
  Throws:
    `XPathException`

### ceiling

    public NumericValue ceiling()
                         throws XPathException

  Specified by:
    `ceiling` in class `NumericValue`
  Throws:
    `XPathException`

### floor

    public NumericValue floor()
                       throws XPathException

  Specified by:
    `floor` in class `NumericValue`
  Throws:
    `XPathException`

### round

    public NumericValue round()
                       throws XPathException

  Specified by:
    `round` in class `NumericValue`
  Throws:
    `XPathException`

### round

    public NumericValue round(IntegerValue precision)
                       throws XPathException

  Specified by:
    `round` in class `NumericValue`
  Throws:
    `XPathException`

### minus

    public ComputableValue minus(ComputableValue other)
                          throws XPathException

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

### plus

    public ComputableValue plus(ComputableValue other)
                         throws XPathException

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

### mult

    public ComputableValue mult(ComputableValue other)
                         throws XPathException

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

### div

    public ComputableValue div(ComputableValue other)
                        throws XPathException

  The div operator performs floating-point division according to IEEE 754.

  Specified by:
    `div` in class `ComputableValue`
  Throws:
    `XPathException`
  See Also:
    `NumericValue.idiv(org.exist.xquery.value.NumericValue)`

### idiv

    public IntegerValue idiv(NumericValue other)
                      throws XPathException

  Specified by:
    `idiv` in class `NumericValue`
  Throws:
    `XPathException`

### mod

    public NumericValue mod(NumericValue other)
                     throws XPathException

  Specified by:
    `mod` in class `NumericValue`
  Throws:
    `XPathException`

### negate

    public NumericValue negate()
                        throws XPathException

  Specified by:
    `negate` in class `NumericValue`
  Throws:
    `XPathException`

### abs

    public NumericValue abs()
                     throws XPathException

  Specified by:
    `abs` in class `NumericValue`
  Throws:
    `XPathException`

### max

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

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

### min

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

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

### conversionPreference

    public int conversionPreference(java.lang.Class javaClass)

  Description copied from interface: `Sequence`
  Returns a preference indicator, indicating the preference of a value to be converted into the given Java class. Low numbers mean that the value can be easily converted into the given class.

  Specified by:
    `conversionPreference` in interface `Item`
  Overrides:
    `conversionPreference` in class `AtomicValue`

### toJavaObject

    public java.lang.Object toJavaObject(java.lang.Class target)
                                  throws XPathException

  Description copied from interface: `Sequence`
  Convert the value into an instance of the specified Java class.

  Specified by:
    `toJavaObject` in interface `Item`
  Overrides:
    `toJavaObject` in class `AtomicValue`
  Throws:
    `XPathException`

### compareTo

    public int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`
  Overrides:
    `compareTo` in class `AtomicValue`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.