| java.lang.Object net.sf.saxon.sort.GroupByIterator
GroupByIterator | public class GroupByIterator implements GroupIterator,LastPositionFinder,LookaheadIterator(Code) | | A GroupByIterator iterates over a sequence of groups defined by
xsl:for-each-group group-by="x". The groups are returned in
order of first appearance. Note that an item can appear in several groups;
indeed, an item may be the leading item of more than one group, which means
that knowing the leading item is not enough to know the current group.
The GroupByIterator acts as a SequenceIterator, where successive calls of
next() return the leading item of each group in turn. The current item of
the iterator is therefore the leading item of the current group. To get access
to all the members of the current group, the method iterateCurrentGroup() is used;
this underpins the current-group() function in XSLT. The grouping key for the
current group is available via the getCurrentGroupingKey() method.
|
GroupByIterator | public GroupByIterator(SequenceIterator population, Expression keyExpression, XPathContext keyContext, Comparator collator) throws XPathException(Code) | | Create a GroupByIterator
Parameters: population - iterator over the population to be grouped Parameters: keyExpression - the expression used to calculate the grouping key Parameters: keyContext - dynamic context for calculating the grouping key Parameters: collator - Collation to be used for comparing grouping keys throws: XPathException - |
getCurrentGroup | public List getCurrentGroup()(Code) | | Get the contents of the current group as a java List
the contents of the current group |
getCurrentGroupingKey | public AtomicValue getCurrentGroupingKey()(Code) | | Get the value of the grouping key for the current group
the grouping key |
getLastPosition | public int getLastPosition() throws XPathException(Code) | | Get the last position (that is, the number of groups)
|
getProperties | public int getProperties()(Code) | | Get properties of this iterator, as a bit-significant integer.
the properties of this iterator. This will be some combination ofproperties such as GROUNDED, LAST_POSITION_FINDER,and LOOKAHEAD. It is alwaysacceptable to return the value zero, indicating that there are no known special properties.It is acceptable for the properties of the iterator to change depending on its state. |
hasNext | public boolean hasNext()(Code) | | |
iterateCurrentGroup | public SequenceIterator iterateCurrentGroup()(Code) | | Get an iterator over the items in the current group
the iterator |
position | public int position()(Code) | | |
|
|