org.exist.xquery.value
Class YearMonthDurationValue
java.lang.Object
org.exist.xquery.value.AtomicValue
org.exist.xquery.value.ComputableValue
org.exist.xquery.value.DurationValue
org.exist.xquery.value.OrderedDurationValue
org.exist.xquery.value.YearMonthDurationValue
- All Implemented Interfaces:
- java.lang.Comparable, Indexable, Item, Sequence
- public class YearMonthDurationValue
- extends org.exist.xquery.value.OrderedDurationValue
- Author:
- Piotr Kaminski
Methods inherited from class org.exist.xquery.value.AtomicValue |
add, addAll, atomize, clearContext, compareTo, contains, copyTo, deserialize, dump, endsWith, getCardinality, getDocumentSet, getItemType, getLength, hasMany, hasOne, isCached, isEmpty, isPersistentSet, itemAt, 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 |
CANONICAL_ZERO_DURATION
public static final javax.xml.datatype.Duration CANONICAL_ZERO_DURATION
YearMonthDurationValue
public YearMonthDurationValue(java.lang.String str)
throws XPathException
getValue
public int getValue()
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 DurationValue
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
- Overrides:
getStringValue
in class DurationValue
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
- Overrides:
convertTo
in class DurationValue
- Throws:
XPathException
plus
public ComputableValue plus(ComputableValue other)
throws XPathException
- Throws:
XPathException
mult
public ComputableValue mult(ComputableValue other)
throws XPathException
- Overrides:
mult
in class DurationValue
- Throws:
XPathException
div
public ComputableValue div(ComputableValue other)
throws XPathException
- Overrides:
div
in class DurationValue
- 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 DurationValue
- Throws:
XPathException
compareTo
public boolean compareTo(java.text.Collator collator,
int operator,
AtomicValue other)
throws XPathException
- Overrides:
compareTo
in class DurationValue
- Throws:
XPathException
compareTo
public int compareTo(java.text.Collator collator,
AtomicValue other)
throws XPathException
- Overrides:
compareTo
in class DurationValue
- Throws:
XPathException
max
public AtomicValue max(java.text.Collator collator,
AtomicValue other)
throws XPathException
- Overrides:
max
in class DurationValue
- Throws:
XPathException
min
public AtomicValue min(java.text.Collator collator,
AtomicValue other)
throws XPathException
- Overrides:
min
in class DurationValue
- Throws:
XPathException
minus
public ComputableValue minus(ComputableValue other)
throws XPathException
- Overrides:
minus
in class DurationValue
- Throws:
XPathException
Copyright (C) Wolfgang Meier. All rights reserved.