Package net.sf.saxon.expr.sort
Interface GroupIterator
- All Superinterfaces:
AutoCloseable
,Closeable
,SequenceIterator
- All Known Implementing Classes:
GroupAdjacentIterator
,GroupBreakingIterator
,GroupByIterator
,GroupEndingIterator
,GroupMatchingIterator
,GroupStartingIterator
,ManualGroupIterator
,MergeGroupingIterator
,SortedGroupIterator
A GroupIterator is an iterator that iterates over a sequence of groups.
The normal methods such as next() and current() always deliver the leading item
of the group. Additional methods are available to get the grouping key for the
current group (only applicable to group-by and group-adjacent), and to get all the
members of the current group.
-
Method Summary
Modifier and TypeMethodDescriptionGet a sequence containing the members of the current group, in population order.Get the grouping key of the current groupgetSnapShot
(XPathContext context) Get a pseudo-iterator which represents a snapshot of this sequence at the current positionMethods inherited from interface net.sf.saxon.om.SequenceIterator
close, next
-
Method Details
-
getCurrentGroupingKey
AtomicSequence getCurrentGroupingKey()Get the grouping key of the current group- Returns:
- the current grouping key in the case of group-by or group-adjacent, or null in the case of group-starting-with and group-ending-with
-
currentGroup
Get a sequence containing the members of the current group, in population order. This may be a MemoSequence rather than a grounded value- Returns:
- a sequence containing all the members of the current group, in population order.
- Throws:
XPathException
- if a dynamic error occurs
-
getSnapShot
Get a pseudo-iterator which represents a snapshot of this sequence at the current position- Parameters:
context
- the XPath context- Returns:
- the snapshot sequence
- Throws:
XPathException
- if any error occurs
-