net.sf.saxon.sort

Class GroupBySingletonIterator

public class GroupBySingletonIterator extends GroupByIterator

A variant of the GroupByIterator used for XQuery 1.1 grouping, where the grouping key is either a single atomic value or an empty sequence, and an empty sequence compares equal to an empty sequence.
Constructor Summary
GroupBySingletonIterator(SequenceIterator population, Expression keyExpression, XPathContext keyContext, StringCollator collator)
Create a GroupByIterator
Method Summary
protected voidprocessItem(HashMap<ComparisonKey,List<Item>> index, Item item, XPathContext c2)
Process one item in the population

Constructor Detail

GroupBySingletonIterator

public GroupBySingletonIterator(SequenceIterator population, Expression keyExpression, XPathContext keyContext, StringCollator collator)
Create a GroupByIterator

Parameters: population iterator over the population to be grouped keyExpression the expression used to calculate the grouping key keyContext dynamic context for calculating the grouping key collator Collation to be used for comparing grouping keys

Throws: net.sf.saxon.trans.XPathException

Method Detail

processItem

protected void processItem(HashMap<ComparisonKey,List<Item>> index, Item item, XPathContext c2)
Process one item in the population

Parameters: index the index of items item the item from the population to be processed c2 the XPath evaluation context

Throws: net.sf.saxon.trans.XPathException