net.sf.saxon.sort

Class GroupAdjacentIterator

public class GroupAdjacentIterator extends Object implements GroupIterator, LookaheadIterator

A GroupAdjacentIterator iterates over a sequence of groups defined by xsl:for-each-group group-adjacent="x". The groups are returned in order of first appearance.

Each step of this iterator advances to the first item of the next group, leaving the members of that group in a saved list.

Constructor Summary
GroupAdjacentIterator(SequenceIterator population, Expression keyExpression, XPathContext baseContext, StringCollator collator)
Method Summary
voidclose()
Itemcurrent()
SequenceIteratorgetAnother()
AtomicValuegetCurrentGroupingKey()
intgetProperties()
Get properties of this iterator, as a bit-significant integer.
booleanhasNext()
SequenceIteratoriterateCurrentGroup()
Itemnext()
intposition()

Constructor Detail

GroupAdjacentIterator

public GroupAdjacentIterator(SequenceIterator population, Expression keyExpression, XPathContext baseContext, StringCollator collator)

Method Detail

close

public void close()

current

public Item current()

getAnother

public SequenceIterator getAnother()

getCurrentGroupingKey

public AtomicValue getCurrentGroupingKey()

getProperties

public int getProperties()
Get properties of this iterator, as a bit-significant integer.

Returns: the properties of this iterator. This will be some combination of properties such as GroupAdjacentIterator, GroupAdjacentIterator, and GroupAdjacentIterator. It is always acceptable 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()

iterateCurrentGroup

public SequenceIterator iterateCurrentGroup()

next

public Item next()

position

public int position()