public interface GroundedValue extends Sequence
Modifier and Type | Method and Description |
---|---|
boolean |
effectiveBooleanValue()
Get the effective boolean value of this sequence
|
int |
getLength()
Get the size of the value (the number of items)
|
String |
getStringValue()
Get the string value of this sequence.
|
CharSequence |
getStringValueCS()
Get the string value of this sequence.
|
Item |
head()
Get the first item of the sequence.
|
Item |
itemAt(int n)
Get the n'th item in the value, counting from 0
|
UnfailingIterator |
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
|
UnfailingIterator iterate()
Item itemAt(int n)
n
- the index of the required item, with 0 representing the first item in the sequenceItem head()
GroundedValue subsequence(int start, int length)
start
- 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 sequenceint getLength()
boolean effectiveBooleanValue() throws XPathException
XPathException
- if the sequence has no effective boolean value (for example a sequence of two integers)String getStringValue() throws XPathException
XPathException
- if the sequence contains items that have no string value (for example, function items)CharSequence getStringValueCS() throws XPathException
XPathException
- if the sequence contains items that have no string value (for example, function items)GroundedValue reduce()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.