public class ZenoSequence extends java.lang.Object implements GroundedValue
This sequence implementation
| Modifier and Type | Class and Description |
|---|---|
static class |
ZenoSequence.ZenoSequenceIterator
A SequenceIterator over a ZenoSequence
|
| Constructor and Description |
|---|
ZenoSequence()
Construct an empty ZenoSequence
|
ZenoSequence(ZenoChain<Item> chain)
Constructor to create a ZenoSequence that wraps a supplied ZenoChain
|
| Modifier and Type | Method and Description |
|---|---|
ZenoSequence |
append(Item item)
Append a single item to the end of the sequence
|
ZenoSequence |
appendSequence(GroundedValue items)
Append a sequence of item to the end of the sequence
|
static ZenoSequence |
fromList(java.util.List<Item> items)
Construct a ZenoSequence from a list of items
|
int |
getLength()
Get the length of the sequence
|
java.lang.String |
getStringValue()
Get a string representation of the sequence, consisting of the space-separated concatenation
of the string representation of the items in the sequence
|
UnicodeString |
getUnicodeStringValue()
Get a string representation of the sequence, consisting of the space-separated concatenation
of the string representation of the items in the sequence
|
Item |
head()
Get the first item in the sequence
|
Item |
itemAt(int n)
Get the item at a given position in the sequence
|
SequenceIterator |
iterate()
Get an iterator over the items in the sequence
|
static ZenoSequence |
join(java.util.List<GroundedValue> segments)
Create a ZenoSequence by concatenating a number of sequences
|
GroundedValue |
subsequence(int start,
int length)
Get a subsequence of the value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasIterable, concatenate, containsNode, effectiveBooleanValue, materialize, reduce, toShortStringmakeRepeatablepublic static ZenoSequence fromList(java.util.List<Item> items)
items - the items to be includedpublic SequenceIterator iterate()
iterate in interface GroundedValueiterate in interface Sequencepublic Item itemAt(int n)
itemAt in interface GroundedValuen - the index of the required item, with zero (0) representing the first item in the sequencepublic Item head()
head in interface GroundedValuehead in interface Sequencepublic 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 length goes off the end of the sequence, the result returns items up to the end
of the sequencepublic int getLength()
getLength in interface GroundedValuepublic UnicodeString getUnicodeStringValue() throws XPathException
getUnicodeStringValue in interface GroundedValueXPathException - if there is an item in the sequence with no string value, for
example a mappublic java.lang.String getStringValue()
throws XPathException
getStringValue in interface GroundedValueXPathException - if there is an item in the sequence with no string value, for
example a mappublic ZenoSequence append(Item item)
item - the item to be appendedpublic ZenoSequence appendSequence(GroundedValue items)
items - the items to be appendedpublic static ZenoSequence join(java.util.List<GroundedValue> segments)
segments - the sequences to be concatenatedCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.