public class SortedGroupIterator extends SortedIterator implements GroupIterator
base, comparators, context, count, position, sortKeyEvaluator, valuesATOMIZING, 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.
|
SortedGroupIterator |
getAnother()
Get another SequenceIterator that iterates over the same items as the original,
but which is repositioned at the start of the sequence.
|
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
|
close, compare, getLength, getProperties, hasNext, initializeAnother, setHostLanguage, swapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getPropertiespublic SortedGroupIterator(XPathContext context, GroupIterator base, SortKeyEvaluator sortKeyEvaluator, AtomicComparer[] comparators)
protected void buildArray()
throws XPathException
buildArray in class SortedIteratorXPathExceptionpublic Item next() throws XPathException
SortedIteratornext in interface SequenceIteratornext in class SortedIteratorXPathException - if an error occurs retrieving the next itempublic AtomicSequence getCurrentGroupingKey()
GroupIteratorgetCurrentGroupingKey in interface GroupIteratorpublic SequenceIterator iterateCurrentGroup() throws XPathException
GroupIteratoriterateCurrentGroup in interface GroupIteratorXPathException - if a dynamic error occurspublic boolean hasCurrentGroup()
GroupIteratorhasCurrentGroup in interface GroupIteratorpublic boolean hasCurrentGroupingKey()
GroupIteratorhasCurrentGroupingKey in interface GroupIteratorpublic SortedGroupIterator getAnother() throws XPathException
SequenceIteratorThis method allows access to all the items in the sequence without disturbing the current position of the iterator. Internally, its main use is in evaluating the last() function.
This method does not change the state of the iterator.
Some implementations of this method may regenerate the input sequence, creating new nodes with different identity from the original. This is not recommended, but is hard to prevent. This causes no problem for the primary usage of this method to support the last() function, but it has been known to cause trouble in other situations.
getAnother in interface SequenceIteratorgetAnother in class SortedIteratorXPathException - if any error occurspublic ManualGroupIterator getSnapShot(XPathContext context) throws XPathException
GroupIteratorgetSnapShot in interface GroupIteratorXPathExceptionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.