Package net.sf.saxon.tree.iter
Class ListIterator
- java.lang.Object
-
- net.sf.saxon.tree.iter.ListIterator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LastPositionFinder
,SequenceIterator
,GroundedIterator
,LookaheadIterator
,ReversibleIterator
- Direct Known Subclasses:
ListIterator.Of
public abstract class ListIterator extends java.lang.Object implements SequenceIterator, 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, andAtomicListIterator
, 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 Summary
Nested Classes Modifier and Type Class Description static class
ListIterator.Of<T extends Item>
static class
ListIterator.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 Summary
Constructors Constructor Description ListIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
supportsHasNext()
Ask whether the hasNext() method can be called.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.tree.iter.GroundedIterator
getResidue, isActuallyGrounded, materialize
-
Methods inherited from interface net.sf.saxon.expr.LastPositionFinder
getLength, supportsGetLength
-
Methods inherited from interface net.sf.saxon.tree.iter.LookaheadIterator
hasNext
-
Methods inherited from interface net.sf.saxon.tree.iter.ReversibleIterator
getReverseIterator
-
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, discharge, next
-
-
-
-
Method Detail
-
supportsHasNext
public boolean supportsHasNext()
Description copied from interface:LookaheadIterator
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)- Specified by:
supportsHasNext
in interfaceLookaheadIterator
- Returns:
- true if the
LookaheadIterator.hasNext()
method is available
-
-