Package net.sf.saxon.value
Class SequenceExtent
java.lang.Object
net.sf.saxon.value.SequenceExtent
- All Implemented Interfaces:
GroundedValue
,Sequence
- Direct Known Subclasses:
SequenceExtent.Of
A sequence value implemented extensionally. That is, this class represents a sequence
by allocating memory to each item in the sequence.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SequenceExtent.Of
<Item> from
(SequenceIterator iter) Construct a sequence containing all the remaining items in a SequenceIterator.static GroundedValue
makeResidue
(SequenceIterator iter) Factory method to make a GroundedValue holding the remaining contents of any SequenceIterator, that is, the contents that have not yet been readstatic <T extends Item>
GroundedValuemakeSequenceExtent
(List<T> input) Factory method to make a Value holding the contents of any List of itemsabstract SequenceIterator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, getLength, getStringValue, getUnicodeStringValue, head, itemAt, iterate, materialize, reduce, subsequence, toShortString
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
Method Details
-
from
Construct a sequence containing all the remaining items in a SequenceIterator.- Parameters:
iter
- The supplied sequence of items. The returned sequence will contain all items delivered by repeated calls on next() on this iterator, and the iterator will be consumed by calling the method.- Returns:
- a sequence of the remaining items
- Throws:
UncheckedXPathException
- if reading the items using the SequenceIterator raises an error
-
makeResidue
Factory method to make a GroundedValue holding the remaining contents of any SequenceIterator, that is, the contents that have not yet been read- Parameters:
iter
- a Sequence iterator that may or may not be consumed to deliver the items in the sequence. The iterator need not be positioned at the start.- Returns:
- a GroundedValue holding the items delivered by the SequenceIterator. If the
sequence is empty the result will be an instance of
EmptySequence
. If it is of length one, the result will be anItem
. In all other cases, it will be an instance ofSequenceExtent
. - Throws:
UncheckedXPathException
- if an error occurs processing the values from the iterator.
-
makeSequenceExtent
Factory method to make a Value holding the contents of any List of items- Type Parameters:
T
- the type of items in the list- Parameters:
input
- a List containing the items in the sequence. The caller guarantees that the list will not be subsequently modified.- Returns:
- a grounded sequence holding the items in the list. If the
sequence is empty the result will be an instance of
EmptySequence
. If it is of length one, the result will be anItem
. In all other cases, it will be an instance ofSequenceExtent
.
-
reverseIterate
-