net.sf.saxon.sort
Class SortedGroupIterator
java.lang.Object
net.sf.saxon.sort.SortedIterator
net.sf.saxon.sort.SortedGroupIterator
- All Implemented Interfaces:
- LastPositionFinder, LookaheadIterator, SequenceIterator, GroupIterator, Sortable
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).
SortedGroupIterator
public SortedGroupIterator(XPathContext context,
GroupIterator base,
SortKeyEvaluator sortKeyEvaluator,
AtomicComparer[] comparators,
InstructionInfoProvider origin)
getCurrentGroupingKey
public AtomicValue getCurrentGroupingKey()
- Description copied from interface:
GroupIterator
- Get the grouping key of the current group
- Specified by:
getCurrentGroupingKey
in 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
iterateCurrentGroup
public SequenceIterator iterateCurrentGroup()
throws XPathException
- Description copied from interface:
GroupIterator
- Get 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:
iterateCurrentGroup
in interface GroupIterator
- Returns:
- an iterator over all the members of the current group, in population
order.
- Throws:
XPathException
Copyright (C) Michael H. Kay. All rights reserved.