|
|||||||
| 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.DurationValue
public class DurationValue
| Field Summary | |
|---|---|
static int |
DAY
|
static int |
HOUR
|
static int |
MINUTE
|
static int |
MONTH
|
static int |
YEAR
|
| Fields inherited from class org.exist.xquery.value.AtomicValue |
|---|
EMPTY_VALUE |
| Fields inherited from interface org.exist.xquery.value.Sequence |
|---|
EMPTY_SEQUENCE |
| Constructor Summary | |
|---|---|
DurationValue(Duration duration)
|
|
DurationValue(String str)
|
|
| Method Summary | |
|---|---|
static boolean |
areReallyEqual(Duration duration1,
Duration duration2)
|
int |
compareTo(Collator collator,
AtomicValue other)
|
boolean |
compareTo(Collator collator,
int operator,
AtomicValue other)
|
int |
conversionPreference(Class target)
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)
|
boolean |
effectiveBooleanValue()
Get the effective boolean value of this sequence. |
Duration |
getCanonicalDuration()
|
int |
getPart(int part)
|
double |
getSeconds()
|
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. |
AtomicValue |
max(Collator collator,
AtomicValue other)
|
AtomicValue |
min(Collator collator,
AtomicValue other)
|
ComputableValue |
minus(ComputableValue other)
|
ComputableValue |
mult(ComputableValue other)
|
DurationValue |
negate()
|
ComputableValue |
plus(ComputableValue other)
|
Object |
toJavaObject(Class target)
Convert the value into an instance of the specified Java class. |
static DurationValue |
wrap(Duration duration)
Create a new duration value of the most specific type allowed by the fields set in the given duration object. |
| Methods inherited from class org.exist.xquery.value.AtomicValue |
|---|
add, addAll, atomize, clearContext, compareTo, contains, copyTo, dump, endsWith, getCardinality, getCollectionIterator, getDocumentSet, getItemCount, getItemType, getState, hasChanged, hasMany, hasOne, isCacheable, isCached, isEmpty, isPersistentSet, itemAt, 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 int YEAR
public static final int MONTH
public static final int DAY
public static final int HOUR
public static final int MINUTE
| Constructor Detail |
|---|
public DurationValue(Duration duration)
public DurationValue(String str)
throws XPathException
XPathException| Method Detail |
|---|
public static DurationValue wrap(Duration duration)
duration - the duration to wrap
DurationValuepublic Duration getCanonicalDuration()
public int getType()
IndexableType.
getType in interface IndexablegetType in interface ItemgetType in class AtomicValue
public DurationValue negate()
throws XPathException
XPathExceptionpublic String getStringValue()
Item
getStringValue in interface ItemgetStringValue in interface SequencegetStringValue in class ComputableValuepublic int getPart(int part)
public double getSeconds()
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 ComputableValuerequiredType - one of the type constants defined in class Type
XPathException
public boolean compareTo(Collator collator,
int operator,
AtomicValue other)
throws XPathException
compareTo in class ComputableValueXPathException
public int compareTo(Collator collator,
AtomicValue other)
throws XPathException
compareTo in class ComputableValueXPathException
public AtomicValue max(Collator collator,
AtomicValue other)
throws XPathException
max in class ComputableValueXPathException
public AtomicValue min(Collator collator,
AtomicValue other)
throws XPathException
min in class ComputableValueXPathException
public ComputableValue plus(ComputableValue other)
throws XPathException
plus in class ComputableValueXPathException
public ComputableValue minus(ComputableValue other)
throws XPathException
minus in class ComputableValueXPathException
public ComputableValue mult(ComputableValue other)
throws XPathException
mult in class ComputableValueXPathException
public ComputableValue div(ComputableValue other)
throws XPathException
div in class ComputableValueXPathExceptionpublic int conversionPreference(Class target)
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 AtomicValueXPathException
public boolean effectiveBooleanValue()
throws XPathException
Sequence
effectiveBooleanValue in interface SequenceeffectiveBooleanValue in class AtomicValueXPathException
public static boolean areReallyEqual(Duration duration1,
Duration duration2)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||