public abstract class AbstractItem extends Object implements Item, GroundedValue
| Constructor and Description |
|---|
AbstractItem() |
| Modifier and Type | Method and Description |
|---|---|
int |
getLength()
Get the size of the value (the number of items)
|
Item |
head()
Get the first item in the sequence.
|
Item |
itemAt(int n)
Get the n'th item in the value, counting from 0
|
SequenceIterator<? extends Item> |
iterate()
Get an iterator over all the items in the sequence
|
GroundedValue |
reduce()
Reduce the sequence to its simplest form.
|
GroundedValue |
subsequence(int start,
int length)
Get a subsequence of the value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStringValue, getStringValueCSeffectiveBooleanValue, getStringValue, getStringValueCSpublic Item itemAt(int n)
itemAt in interface GroundedValuen - the index of the required item, with 0 representing the first item in the sequencepublic final GroundedValue subsequence(int start, int length)
subsequence in interface GroundedValuestart - the index of the first item to be included in the result, counting from zero.
A negative value is taken as zero. If the value is beyond the end of the sequence, an empty
sequence is returnedlength - the number of items to be included in the result. Specify Integer.MAX_VALUE to
get the subsequence up to the end of the base sequence. If the value is negative, an empty sequence
is returned. If the value goes off the end of the sequence, the result returns items up to the end
of the sequencepublic final int getLength()
getLength in interface GroundedValuepublic Item head() throws XPathException
head in interface SequenceXPathException - in the situation where the sequence is evaluated lazily, and
evaluation of the first item causes a dynamic error.public SequenceIterator<? extends Item> iterate() throws XPathException
iterate in interface SequenceXPathException - in the situation where the sequence is evaluated lazily, and
constructing an iterator over the items causes a dynamic error.public GroundedValue reduce()
reduce in interface GroundedValueCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.