Package net.sf.saxon.expr.sort
Class GroupStartingIterator
java.lang.Object
net.sf.saxon.expr.sort.GroupMatchingIterator
net.sf.saxon.expr.sort.GroupStartingIterator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,LastPositionFinder
,GroupIterator
,SequenceIterator
,LookaheadIterator
public class GroupStartingIterator
extends GroupMatchingIterator
implements LookaheadIterator, GroupIterator
A GroupStartingIterator iterates over a sequence of groups defined by
xsl:for-each-group group-starting-with="x". The groups are returned in
order of first appearance.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator
SequenceIterator.Property
-
Field Summary
Fields inherited from class net.sf.saxon.expr.sort.GroupMatchingIterator
baseContext, current, currentMembers, next, pattern, population, position, runningContext, select
-
Constructor Summary
ConstructorsConstructorDescriptionGroupStartingIterator
(Expression select, Pattern startPattern, XPathContext context) -
Method Summary
Methods inherited from class net.sf.saxon.expr.sort.GroupMatchingIterator
close, getCurrentGroupingKey, getProperties, hasNext, iterateCurrentGroup, next
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.expr.sort.GroupIterator
getCurrentGroupingKey, iterateCurrentGroup
Methods inherited from interface net.sf.saxon.tree.iter.LookaheadIterator
hasNext
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materialize, next
-
Constructor Details
-
GroupStartingIterator
public GroupStartingIterator(Expression select, Pattern startPattern, XPathContext context) throws XPathException - Throws:
XPathException
-
-
Method Details
-
getLength
Description copied from interface:LastPositionFinder
Get the last position (that is, the number of items in the sequence). This method is non-destructive: it does not change the state of the iterator. The result is undefined if the next() method of the iterator has already returned null. This method must not be called unless the result of getProperties() on the iterator includes the bit settingSequenceIterator.Property.LAST_POSITION_FINDER
- Specified by:
getLength
in interfaceLastPositionFinder
- Returns:
- the number of items in the sequence
- Throws:
XPathException
- if an error occurs evaluating the sequence in order to determine the number of items
-
advance
- Specified by:
advance
in classGroupMatchingIterator
- Throws:
XPathException
-