net.sf.saxon.expr.sort
Class GroupBySingletonIterator
java.lang.Object
net.sf.saxon.expr.sort.GroupByIterator
net.sf.saxon.expr.sort.GroupBySingletonIterator
- All Implemented Interfaces:
- LastPositionFinder, GroupIterator, SequenceIterator, LookaheadIterator
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.
Methods inherited from class net.sf.saxon.expr.sort.GroupByIterator |
close, current, getAnother, getCurrentGroup, getCurrentGroupingKey, getLastPosition, getProperties, hasNext, iterateCurrentGroup, next, position |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupBySingletonIterator
public GroupBySingletonIterator(SequenceIterator population,
Expression keyExpression,
XPathContext keyContext,
StringCollator collator)
throws XPathException
- Create a GroupByIterator
- Parameters:
population
- iterator over the population to be groupedkeyExpression
- the expression used to calculate the grouping keykeyContext
- dynamic context for calculating the grouping keycollator
- Collation to be used for comparing grouping keys
- Throws:
XPathException
processItem
protected void processItem(HashMap<ComparisonKey,List<Item>> index,
Item item,
XPathContext c2)
throws XPathException
- Process one item in the population
- Overrides:
processItem
in class GroupByIterator
- Parameters:
index
- the index of itemsitem
- the item from the population to be processedc2
- the XPath evaluation context
- Throws:
XPathException
Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.