|
|||||||
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()
Returns the type of the Indexable as one of the constants defined in 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()
Indexable
Type
.
getType
in interface Indexable
getType
in interface Item
getType
in class AtomicValue
public boolean hasFractionalPart()
hasFractionalPart
in class NumericValue
public Item itemAt(int pos)
Sequence
itemAt
in interface Sequence
itemAt
in class AtomicValue
public long getValue()
public void setValue(long value)
public String getStringValue()
Item
getStringValue
in interface Item
getStringValue
in interface Sequence
getStringValue
in class NumericValue
public boolean isNaN()
isNaN
in class NumericValue
public boolean isInfinite()
isInfinite
in class NumericValue
public boolean isZero()
isZero
in class NumericValue
public boolean isNegative()
isNegative
in class NumericValue
public boolean isPositive()
isPositive
in class NumericValue
public AtomicValue convertTo(int requiredType) throws XPathException
Item
Type
. An XPathException
is thrown
if the conversion is impossible.
convertTo
in interface Item
convertTo
in interface Sequence
convertTo
in class NumericValue
requiredType
- one of the type constants defined in class Type
XPathException
public int getInt() throws XPathException
getInt
in class NumericValue
XPathException
public long getLong() throws XPathException
getLong
in class NumericValue
XPathException
public double getDouble() throws XPathException
getDouble
in class NumericValue
XPathException
public NumericValue ceiling() throws XPathException
ceiling
in class NumericValue
XPathException
public NumericValue floor() throws XPathException
floor
in class NumericValue
XPathException
public NumericValue round() throws XPathException
round
in class NumericValue
XPathException
public NumericValue round(IntegerValue precision) throws XPathException
round
in class NumericValue
XPathException
public ComputableValue minus(ComputableValue other) throws XPathException
minus
in class ComputableValue
XPathException
public ComputableValue plus(ComputableValue other) throws XPathException
plus
in class ComputableValue
XPathException
public ComputableValue mult(ComputableValue other) throws XPathException
mult
in class ComputableValue
XPathException
public ComputableValue div(ComputableValue other) throws XPathException
div
in class ComputableValue
XPathException
NumericValue.idiv(org.exist.xquery.value.NumericValue)
public IntegerValue idiv(NumericValue other) throws XPathException
idiv
in class NumericValue
XPathException
public NumericValue mod(NumericValue other) throws XPathException
mod
in class NumericValue
XPathException
public NumericValue negate() throws XPathException
negate
in class NumericValue
XPathException
public NumericValue abs() throws XPathException
abs
in class NumericValue
XPathException
public AtomicValue max(Collator collator, AtomicValue other) throws XPathException
max
in class NumericValue
XPathException
public AtomicValue min(Collator collator, AtomicValue other) throws XPathException
min
in class NumericValue
XPathException
public int conversionPreference(Class javaClass)
Sequence
conversionPreference
in interface Item
conversionPreference
in interface Sequence
conversionPreference
in class AtomicValue
public Object toJavaObject(Class target) throws XPathException
Sequence
toJavaObject
in interface Item
toJavaObject
in interface Sequence
toJavaObject
in class AtomicValue
XPathException
public int compareTo(Object o)
compareTo
in interface Comparable
compareTo
in class AtomicValue
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |