Package net.sf.saxon.om
Interface AxisIterator
-
- All Superinterfaces:
SequenceIterator
- All Known Implementing Classes:
AncestorEnumeration
,AncestorEnumeration
,ArrayIterator
,AttributeEnumeration
,AttributeEnumeration
,AxisIteratorImpl
,ChildEnumeration
,DescendantEnumeration
,DescendantEnumeration
,EmptyIterator
,FollowingEnumeration
,FollowingEnumeration
,FollowingSiblingEnumeration
,ListIterator
,NamespaceIterator
,Navigator.AncestorEnumeration
,Navigator.AxisFilter
,Navigator.BaseEnumeration
,Navigator.DescendantEnumeration
,Navigator.FollowingEnumeration
,Navigator.PrecedingEnumeration
,PrecedingEnumeration
,PrecedingEnumeration
,PrecedingOrAncestorEnumeration
,PrecedingSiblingEnumeration
,PrecedingSiblingEnumeration
,PrependIterator
,ReverseArrayIterator
,SiblingEnumeration
,SingletonIterator
,TreeEnumeration
public interface AxisIterator extends SequenceIterator
A SequenceIterator is used to iterate over a sequence. An AxisIterator is a SequenceIterator that throws no exceptions. Despite its name, an AxisIterator is not invariably used to find nodes on an axis of a tree, though this is its most common use. For example, the class ArrayIterator is also defined as an AxisIterator.
-
-
Field Summary
-
Fields inherited from interface net.sf.saxon.om.SequenceIterator
ATOMIZABLE, GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Item
current()
Get the current item in the sequence.SequenceIterator
getAnother()
Get another iterator over the same sequence of items, positioned at the start of the sequence.Item
next()
Get the next item in the sequence.int
position()
Get the current position-
Methods inherited from interface net.sf.saxon.om.SequenceIterator
getProperties
-
-
-
-
Method Detail
-
next
Item next()
Get the next item in the sequence.- Specified by:
next
in interfaceSequenceIterator
- Returns:
- the next Item. If there are no more nodes, return null.
-
current
Item current()
Get the current item in the sequence.- Specified by:
current
in interfaceSequenceIterator
- 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
- Returns:
- the position of the current item (the item most recently returned by next()), starting at 1 for the first node
-
getAnother
SequenceIterator 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
- Returns:
- a new iterator over the same sequence
-
-