Package net.sf.saxon.tree.iter
Class ListIterator
java.lang.Object
net.sf.saxon.tree.iter.ListIterator
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- LastPositionFinder,- FocusIterator,- SequenceIterator,- GroundedIterator,- LookaheadIterator,- ReversibleIterator
- Direct Known Subclasses:
- ListIterator.Of
public abstract class ListIterator
extends Object
implements SequenceIterator, FocusIterator, LastPositionFinder, LookaheadIterator, GroundedIterator, ReversibleIterator
Class ListIterator, iterates over a sequence of items held in a Java List.
 
Note: There are three subclasses: ListIterator, which takes a general list of items,
 NodeListIterator, which takes a list of nodes, and AtomicListIterator, which takes
 a list of atomic values. It might seem simpler to implement this entirely using generics, but that
 design proves very difficult to translate to C#, where generics behave very differently. With this approach
 the generics are confined to this abstract class.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classListIterator.Of<T extends Item>static classListIterator.OfAtomic<A extends AtomicValue>ListIterator.OfAtomic is a subclass of ListIterator where the list always contains atomic values; it therefore implements the AtomicIterator interface.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAsk whether the hasNext() method can be called.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.FocusIteratorcurrent, getLength, positionMethods inherited from interface net.sf.saxon.tree.iter.GroundedIteratorgetResidue, isActuallyGrounded, materializeMethods inherited from interface net.sf.saxon.expr.LastPositionFindergetLength, supportsGetLengthMethods inherited from interface net.sf.saxon.tree.iter.LookaheadIteratorhasNextMethods inherited from interface net.sf.saxon.tree.iter.ReversibleIteratorgetReverseIteratorMethods inherited from interface net.sf.saxon.om.SequenceIteratorclose, next
- 
Constructor Details- 
ListIteratorpublic ListIterator()
 
- 
- 
Method Details- 
supportsHasNextpublic boolean supportsHasNext()Description copied from interface:LookaheadIteratorAsk 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)- Specified by:
- supportsHasNextin interface- LookaheadIterator
- Returns:
- true if the LookaheadIterator.hasNext()method is available
 
 
-