public class SortedGroupIterator extends SortedIterator implements GroupIterator
base, comparators, context, count, position, sortKeyEvaluator, values
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
Constructor and Description |
---|
SortedGroupIterator(XPathContext context,
GroupIterator base,
SortKeyEvaluator sortKeyEvaluator,
AtomicComparer[] comparators) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildArray()
Override the method that builds the array of values and sort keys.
|
AtomicSequence |
getCurrentGroupingKey()
Get the grouping key of the current group
|
ManualGroupIterator |
getSnapShot(XPathContext context)
Get a sequence which is a snapshot of this sequence at the current position
|
boolean |
hasCurrentGroup()
Ask whether this iterator has a current group
|
boolean |
hasCurrentGroupingKey()
Ask whether this iterator has a current grouping key
|
SequenceIterator |
iterateCurrentGroup()
Get an iterator over the members of the current group, in population
order.
|
Item |
next()
Get the next item, in sorted order
|
void |
setGroupSlot(int groupSlot)
Set a local variable slot to hold the value of the current group
|
void |
setKeySlot(int keySlot)
Set a local variable slot to hold the value of the current grouping key
|
close, compare, current, getAnother, getLength, getProperties, hasNext, position, setHostLanguage, swap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, current, getAnother, getProperties, position
public SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators)
public void setGroupSlot(int groupSlot)
GroupIterator
setGroupSlot
in interface GroupIterator
groupSlot
- the stack frame position of the variable holding the current grouppublic void setKeySlot(int keySlot)
GroupIterator
setKeySlot
in interface GroupIterator
keySlot
- the stack frame position of the variable holding the current grouping keyprotected void buildArray() throws XPathException
buildArray
in class SortedIterator
XPathException
public Item next() throws XPathException
SortedIterator
next
in interface SequenceIterator
next
in class SortedIterator
XPathException
- if an error occurs retrieving the next itempublic AtomicSequence getCurrentGroupingKey()
GroupIterator
getCurrentGroupingKey
in interface GroupIterator
public SequenceIterator iterateCurrentGroup() throws XPathException
GroupIterator
iterateCurrentGroup
in interface GroupIterator
XPathException
- if a dynamic error occurspublic boolean hasCurrentGroup()
GroupIterator
hasCurrentGroup
in interface GroupIterator
public boolean hasCurrentGroupingKey()
GroupIterator
hasCurrentGroupingKey
in interface GroupIterator
public ManualGroupIterator getSnapShot(XPathContext context) throws XPathException
GroupIterator
getSnapShot
in interface GroupIterator
XPathException
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.