net.sf.saxon.sort

Class SortedGroupIterator

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).
Constructor Summary
SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators, Instruction origin)
Method Summary
protected voidbuildArray()
Override the method that builds the array of values and sort keys.
AtomicValuegetCurrentGroupingKey()
SequenceIteratoriterateCurrentGroup()

Constructor Detail

SortedGroupIterator

public SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators, Instruction origin)

Method Detail

buildArray

protected void buildArray()
Override the method that builds the array of values and sort keys.

Throws: XPathException

getCurrentGroupingKey

public AtomicValue getCurrentGroupingKey()

iterateCurrentGroup

public SequenceIterator iterateCurrentGroup()