- All Superinterfaces:
- All Known Implementing Classes:
public interface LookaheadIterator extends SequenceIteratorA SequenceIterator is used to iterate over a sequence. A LookaheadIterator is one that supports a hasNext() method to determine if there are more nodes after the current node.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
hasNext()Determine whether there are more items to come.
supportsHasNext()Ask whether the hasNext() method can be called.
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, discharge, next
boolean supportsHasNext()Ask whether the hasNext() method can be called. This method must be called before calling hasNext(), because some iterators implement this interface, but only support look-ahead under particular circumstances (this is usually because they delegate to another iterator)
- true if the
hasNext()method is available
boolean hasNext()Determine whether there are more items to come. Note that this operation is stateless and it is not necessary (or usual) to call it before calling next(). It is used only when there is an explicit need to tell if we are at the last element.
This method must not be called unless the result of
- true if there are more items in the sequence