|
||||||||||
| 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
[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()
Returns the type of the Indexable as one of the constants defined in 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)
|
byte[] |
serialize(short collectionId,
boolean caseSensitive)
Serialize the value plus collection and possibly element information to an array of bytes. |
byte[] |
serializeValue(int offset,
boolean caseSensitive)
Serialize for the persistant storage |
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, isNaN |
| Methods inherited from class org.exist.xquery.value.AtomicValue |
add, addAll, atomize, clearContext, contains, copyTo, dump, endsWith, getCardinality, getDocumentSet, getItemType, getLength, isCached, isPersistentSet, iterate, removeDuplicates, setIsCached, setSelfAsContext, startsWith, toNodeSet, toSAX, toSequence, toString, unorderedIterator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, 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
public IntegerValue(java.lang.String stringValue)
throws XPathException
public IntegerValue(java.lang.String stringValue,
int requiredType)
throws XPathException
public IntegerValue(java.math.BigInteger value,
int requiredType)
value - requiredType - public IntegerValue(java.math.BigInteger integer)
integer - | Method Detail |
public int getType()
IndexableType.
getType in interface IndexablegetType in class AtomicValuepublic Item itemAt(int pos)
Sequence
itemAt in interface SequenceitemAt in class AtomicValuepublic long getValue()
public void setValue(long value)
public java.lang.String getStringValue()
Item
getStringValue in interface ItemgetStringValue 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 class NumericValueXPathException
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 boolean effectiveBooleanValue()
throws XPathException
Sequence
effectiveBooleanValue in interface SequenceeffectiveBooleanValue in class AtomicValueXPathException
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 ComputableValueXPathExceptionorg.exist.xquery.value.NumericValue#div(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(java.text.Collator collator,
AtomicValue other)
throws XPathException
max in class NumericValueXPathException
public AtomicValue min(java.text.Collator collator,
AtomicValue other)
throws XPathException
min in class NumericValueXPathExceptionpublic int conversionPreference(java.lang.Class javaClass)
Sequence
conversionPreference in interface ItemconversionPreference in class AtomicValue
public java.lang.Object toJavaObject(java.lang.Class target)
throws XPathException
Sequence
toJavaObject in interface ItemtoJavaObject in class AtomicValueXPathException
public byte[] serialize(short collectionId,
boolean caseSensitive)
Indexable
serialize in interface IndexablecollectionId - the collection id to usecaseSensitive - only relevant for string values: if set to false,
strings should be serialized in lower case
org.exist.storage.Indexable#serialize(short)
public byte[] serializeValue(int offset,
boolean caseSensitive)
serializeValue in interface Indexablepublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||