Package net.sf.saxon.tree.iter
Interface UnfailingIterator<T extends Item>
- All Superinterfaces:
SequenceIterator<T>
- All Known Subinterfaces:
AxisIterator<T>
- All Known Implementing Classes:
AncestorEnumeration
,AncestorEnumeration
,ArrayIterator
,AttributeEnumeration
,AttributeEnumeration
,AxisIteratorImpl
,AxisIteratorOverSequence
,ChildEnumeration
,DescendantEnumeration
,DescendantEnumeration
,EmptyAxisIterator
,EmptyIterator
,FollowingEnumeration
,FollowingEnumeration
,FollowingSiblingEnumeration
,IteratorIterator
,ListIterator
,Navigator.AncestorEnumeration
,Navigator.AxisFilter
,Navigator.BaseEnumeration
,Navigator.DescendantEnumeration
,Navigator.EmptyTextFilter
,Navigator.FollowingEnumeration
,Navigator.PrecedingEnumeration
,NodeWrappingAxisIterator
,PrecedingEnumeration
,PrecedingEnumeration
,PrecedingOrAncestorEnumeration
,PrecedingSiblingEnumeration
,PrecedingSiblingEnumeration
,PrependIterator
,ReverseArrayIterator
,SiblingEnumeration
,SingleNodeIterator
,SingletonIterator
,StringTokenIterator
,StringValue.CharacterIterator
,TreeEnumeration
,VirtualCopy.VirtualCopier
,VirtualUntypedCopy.VirtualUntypedCopier
,WrappingIterator
A SequenceIterator is used to iterate over a sequence. An UnfailingIterator
is a SequenceIterator that throws no checked exceptions.
-
Field Summary
Fields inherited from interface net.sf.saxon.om.SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
-
Method Summary
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, getProperties
-
Method Details
-
next
T next()Get the next item in the sequence.- Specified by:
next
in interfaceSequenceIterator<T extends Item>
- Returns:
- the next Item. If there are no more nodes, return null.
-
current
T current()Get the current item in the sequence.- Specified by:
current
in interfaceSequenceIterator<T extends Item>
- Returns:
- the current item, that is, the item most recently returned by next()
-
position
int position()Get the current position- Specified by:
position
in interfaceSequenceIterator<T extends Item>
- Returns:
- the position of the current item (the item most recently returned by next()), starting at 1 for the first node
-
getAnother
UnfailingIterator<T> getAnother()Get another iterator over the same sequence of items, positioned at the start of the sequence. It must be possible to call this method at any time, whether none, some, or all of the items in the original iterator have been read. The method is non-destructive: it does not change the state of the original iterator.- Specified by:
getAnother
in interfaceSequenceIterator<T extends Item>
- Returns:
- a new iterator over the same sequence
-