net.sf.saxon.om
public class SingletonIterator extends Object implements UnfailingIterator, ReversibleIterator, LastPositionFinder, GroundedIterator, LookaheadIterator
Method Summary | |
---|---|
void | close() |
Item | current() |
SequenceIterator | getAnother() |
int | getLastPosition() |
int | getProperties()
Get properties of this iterator, as a bit-significant integer.
|
SequenceIterator | getReverseIterator() |
Item | getValue() |
boolean | hasNext()
Determine whether there are more items to come. |
static UnfailingIterator | makeIterator(Item item)
Factory method. |
GroundedValue | materialize()
Return a Value containing all the items in the sequence returned by this
SequenceIterator
|
Item | next() |
int | position()
Return the current position in the sequence. |
Returns: the properties of this iterator. This will be some combination of properties such as SingletonIterator, SingletonIterator, and SingletonIterator. 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.
Returns: true if there are more items
Parameters: item the item to iterate over
Returns: a SingletonIterator over the supplied item, or an EmptyIterator if the supplied item is null.
Returns: the corresponding Value. If the value is a closure or a function call package, it will be evaluated and expanded.
Returns: 0 before the first call on next(); 1 before the second call on next(); -1 after the second call on next().