net.sf.saxon.expr

Class UnionEnumeration

public class UnionEnumeration extends Object implements SequenceIterator, LookaheadIterator

An enumeration representing a nodeset that is a union of two other NodeSets.
Constructor Summary
UnionEnumeration(SequenceIterator p1, SequenceIterator p2, NodeOrderComparer comparer)
Create the iterator.
Method Summary
voidclose()
Itemcurrent()
SequenceIteratorgetAnother()
intgetProperties()
Get properties of this iterator, as a bit-significant integer.
booleanhasNext()
Itemnext()
intposition()

Constructor Detail

UnionEnumeration

public UnionEnumeration(SequenceIterator p1, SequenceIterator p2, NodeOrderComparer comparer)
Create the iterator. The two input iterators must return nodes in document order for this to work.

Parameters: p1 iterator over the first operand sequence (in document order) p2 iterator over the second operand sequence comparer used to test whether nodes are in document order. Different versions are used for intra-document and cross-document operations

Method Detail

close

public void close()

current

public Item current()

getAnother

public SequenceIterator getAnother()

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 UnionEnumeration, UnionEnumeration, and UnionEnumeration. 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()

next

public Item next()

position

public int position()