Class GroupEndingIterator
java.lang.Object
net.sf.saxon.expr.sort.GroupMatchingIterator
net.sf.saxon.expr.sort.GroupEndingIterator
- All Implemented Interfaces:
GroupIterator, SequenceIterator, LookaheadIterator
public class GroupEndingIterator
extends GroupMatchingIterator
implements GroupIterator, LookaheadIterator
A GroupEndingIterator iterates over a sequence of groups defined by
xsl:for-each-group group-ending-with="x". The groups are returned in
order of first appearance.
-
Field Summary
Fields inherited from class GroupMatchingIterator
baseContext, current, currentMembers, next, pattern, population, position, runningContextFields inherited from interface SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD -
Constructor Summary
ConstructorsConstructorDescriptionGroupEndingIterator(SequenceIterator population, Pattern endPattern, XPathContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadvance()Get another SequenceIterator that iterates over the same items as the original, but which is repositioned at the start of the sequence.Methods inherited from class GroupMatchingIterator
close, current, getCurrentGroupingKey, getProperties, hasNext, iterateCurrentGroup, next, positionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GroupIterator
getCurrentGroupingKey, iterateCurrentGroupMethods inherited from interface LookaheadIterator
hasNextMethods inherited from interface SequenceIterator
close, current, getProperties, next, position
-
Constructor Details
-
GroupEndingIterator
public GroupEndingIterator(SequenceIterator population, Pattern endPattern, XPathContext context) throws XPathException - Throws:
XPathException
-
-
Method Details
-
advance
- Specified by:
advancein classGroupMatchingIterator- Throws:
XPathException
-
getAnother
Description copied from interface:SequenceIteratorGet another SequenceIterator that iterates over the same items as the original, but which is repositioned at the start of the sequence.This method allows access to all the items in the sequence without disturbing the current position of the iterator. Internally, its main use is in evaluating the last() function.
This method does not change the state of the iterator.
- Specified by:
getAnotherin interfaceSequenceIterator- Returns:
- a SequenceIterator that iterates over the same items, positioned before the first item
- Throws:
XPathException- if any error occurs
-