Package net.sf.saxon.expr.sort
Class SortedGroupIterator
- java.lang.Object
- 
- net.sf.saxon.expr.sort.SortedIterator
- 
- net.sf.saxon.expr.sort.SortedGroupIterator
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable,- LastPositionFinder,- GroupIterator,- SequenceIterator,- LookaheadIterator
 
 public class SortedGroupIterator extends SortedIterator implements GroupIterator A SortedGroupIterator is a modified SortedIterator. It sorts a sequence of groups, and is itself a GroupIterator. The modifications retain extra information about the items being sorted. The items are each the leading item of a group, and as well as the item itself, the iterator preserves information about the group: specifically, an iterator over the items in the group, and the value of the grouping key (if any).
- 
- 
Field Summary- 
Fields inherited from class net.sf.saxon.expr.sort.SortedIteratorbase, comparators, context, count, position, sortKeyEvaluator, values
 
- 
 - 
Constructor SummaryConstructors Constructor Description SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildArray()Override the method that builds the array of values and sort keys.AtomicSequencegetCurrentGroupingKey()Get the grouping key of the current groupManualGroupIteratorgetSnapShot(XPathContext context)Get a sequence which is a snapshot of this sequence at the current positionSequenceIteratoriterateCurrentGroup()Get an iterator over the members of the current group, in population order.- 
Methods inherited from class net.sf.saxon.expr.sort.SortedIteratorgetLength, hasNext, next, setHostLanguage, supportsGetLength, supportsHasNext
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface net.sf.saxon.om.SequenceIteratorclose, discharge, next
 
- 
 
- 
- 
- 
Constructor Detail- 
SortedGroupIteratorpublic SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators) 
 
- 
 - 
Method Detail- 
buildArrayprotected void buildArray() throws XPathExceptionOverride the method that builds the array of values and sort keys.- Overrides:
- buildArrayin class- SortedIterator
- Throws:
- XPathException- in the event of a dynamic error
 
 - 
getCurrentGroupingKeypublic AtomicSequence getCurrentGroupingKey() Description copied from interface:GroupIteratorGet the grouping key of the current group- Specified by:
- getCurrentGroupingKeyin interface- GroupIterator
- 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
 
 - 
iterateCurrentGrouppublic SequenceIterator iterateCurrentGroup() throws XPathException Description copied from interface:GroupIteratorGet an iterator over the members of the current group, in population order. This must always be a clean iterator, that is, an iterator that starts at the first item of the group.- Specified by:
- iterateCurrentGroupin interface- GroupIterator
- Returns:
- an iterator over all the members of the current group, in population order.
- Throws:
- XPathException- if a dynamic error occurs
 
 - 
getSnapShotpublic ManualGroupIterator getSnapShot(XPathContext context) throws XPathException Description copied from interface:GroupIteratorGet a sequence which is a snapshot of this sequence at the current position- Specified by:
- getSnapShotin interface- GroupIterator
- Parameters:
- context- the XPath context
- Returns:
- the snapshot sequence
- Throws:
- XPathException- if any error occurs
 
 
- 
 
-