|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.xquery.value.AtomicValue
org.exist.xquery.value.ComputableValue
org.exist.xquery.value.NumericValue
org.exist.xquery.value.IntegerValue
public class IntegerValue
[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(BigInteger integer)
|
|
IntegerValue(BigInteger value,
int requiredType)
|
|
IntegerValue(long value)
|
|
IntegerValue(long value,
int type)
|
|
IntegerValue(String stringValue)
|
|
IntegerValue(String stringValue,
int requiredType)
|
|
| Method Summary | |
|---|---|
NumericValue |
abs()
|
NumericValue |
ceiling()
|
int |
compareTo(Object o)
|
int |
conversionPreference(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. |
NumericValue |
floor()
|
double |
getDouble()
|
int |
getInt()
|
long |
getLong()
|
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()
|
boolean |
hasFractionalPart()
|
IntegerValue |
idiv(NumericValue other)
|
boolean |
isInfinite()
|
boolean |
isNaN()
|
boolean |
isNegative()
|
boolean |
isPositive()
|
boolean |
isZero()
|
Item |
itemAt(int pos)
Returns the item located at the specified position within this sequence. |
AtomicValue |
max(Collator collator,
AtomicValue other)
|
AtomicValue |
min(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)
|
Object |
toJavaObject(Class target)
Convert the value into an instance of the specified Java class. |
| Methods inherited from class org.exist.xquery.value.NumericValue |
|---|
compareTo, compareTo, effectiveBooleanValue |
| Methods inherited from class org.exist.xquery.value.AtomicValue |
|---|
add, addAll, atomize, clearContext, contains, copyTo, dump, endsWith, getCardinality, getCollectionIterator, getDocumentSet, getItemCount, getItemType, getState, hasChanged, hasMany, hasOne, isCacheable, isCached, isEmpty, isPersistentSet, iterate, nodeMoved, promote, removeDuplicates, serializeValue, setIsCached, setSelfAsContext, startsWith, toMemNodeSet, toNodeSet, toSAX, toSequence, toString, unorderedIterator |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IntegerValue ZERO
| Constructor Detail |
|---|
public IntegerValue(long value)
public IntegerValue(long value,
int type)
throws XPathException
XPathException
public IntegerValue(String stringValue)
throws XPathException
XPathException
public IntegerValue(String stringValue,
int requiredType)
throws XPathException
XPathException
public IntegerValue(BigInteger value,
int requiredType)
value - requiredType - public IntegerValue(BigInteger integer)
integer - | Method Detail |
|---|
public int getType()
ItemType.
getType in interface IndexablegetType in interface ItemgetType in class AtomicValuepublic boolean hasFractionalPart()
hasFractionalPart in class NumericValuepublic Item itemAt(int pos)
Sequence
itemAt in interface SequenceitemAt in class AtomicValuepublic long getValue()
public void setValue(long value)
public String getStringValue()
Item
getStringValue in interface ItemgetStringValue in interface SequencegetStringValue in class NumericValuepublic boolean isNaN()
isNaN in class NumericValuepublic boolean isInfinite()
isInfinite in class NumericValuepublic boolean isZero()
isZero in class NumericValuepublic boolean isNegative()
isNegative in class NumericValuepublic boolean isPositive()
isPositive in class NumericValue
public AtomicValue convertTo(int requiredType)
throws XPathException
ItemType. An XPathException is thrown
if the conversion is impossible.
convertTo in interface ItemconvertTo in interface SequenceconvertTo in class NumericValuerequiredType - one of the type constants defined in class Type
XPathException
public int getInt()
throws XPathException
getInt in class NumericValueXPathException
public long getLong()
throws XPathException
getLong in class NumericValueXPathException
public double getDouble()
throws XPathException
getDouble in class NumericValueXPathException
public NumericValue ceiling()
throws XPathException
ceiling in class NumericValueXPathException
public NumericValue floor()
throws XPathException
floor in class NumericValueXPathException
public NumericValue round()
throws XPathException
round in class NumericValueXPathException
public NumericValue round(IntegerValue precision)
throws XPathException
round in class NumericValueXPathException
public ComputableValue minus(ComputableValue other)
throws XPathException
minus in class ComputableValueXPathException
public ComputableValue plus(ComputableValue other)
throws XPathException
plus in class ComputableValueXPathException
public ComputableValue mult(ComputableValue other)
throws XPathException
mult in class ComputableValueXPathException
public ComputableValue div(ComputableValue other)
throws XPathException
div in class ComputableValueXPathExceptionNumericValue.idiv(org.exist.xquery.value.NumericValue)
public IntegerValue idiv(NumericValue other)
throws XPathException
idiv in class NumericValueXPathException
public NumericValue mod(NumericValue other)
throws XPathException
mod in class NumericValueXPathException
public NumericValue negate()
throws XPathException
negate in class NumericValueXPathException
public NumericValue abs()
throws XPathException
abs in class NumericValueXPathException
public AtomicValue max(Collator collator,
AtomicValue other)
throws XPathException
max in class NumericValueXPathException
public AtomicValue min(Collator collator,
AtomicValue other)
throws XPathException
min in class NumericValueXPathExceptionpublic int conversionPreference(Class javaClass)
Sequence
conversionPreference in interface ItemconversionPreference in interface SequenceconversionPreference in class AtomicValue
public Object toJavaObject(Class target)
throws XPathException
Sequence
toJavaObject in interface ItemtoJavaObject in interface SequencetoJavaObject in class AtomicValueXPathExceptionpublic int compareTo(Object o)
compareTo in interface ComparablecompareTo in class AtomicValue
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||