Package net.sf.saxon.tree.iter
Interface UnfailingIterator
- All Superinterfaces:
AutoCloseable,Closeable,SequenceIterator
- All Known Subinterfaces:
AtomicIterator<T>,AxisIterator,ConstrainedIterator<T>
- All Known Implementing Classes:
AncestorEnumeration,AncestorIterator,ArrayIterator,ArrayIterator.OfNodes,ATokenIterator,AttributeAxisIterator,AttributeIterator,BigRangeIterator,ChildEnumeration,ConcatenatingAxisIterator,DescendantIterator,DescendantIteratorSansText,EmptyIterator,FollowingEnumeration,FollowingIterator,FollowingSiblingEnumeration,JTokenIterator,ListIterator,ListIterator.Atomic,ListIterator.OfNodes,ManualIterator,NamedChildIterator,Navigator.AncestorEnumeration,Navigator.AxisFilter,Navigator.DescendantEnumeration,Navigator.EmptyTextFilter,Navigator.FollowingEnumeration,Navigator.PrecedingEnumeration,NodeWrappingAxisIterator,PrecedingEnumeration,PrecedingIterator,PrecedingOrAncestorEnumeration,PrecedingSiblingEnumeration,PrecedingSiblingIterator,PrependAxisIterator,RangeIterator,ReverseListIterator,ReverseRangeIterator,SiblingIterator,SingleAtomicIterator,SingleNodeIterator,SingletonIterator,SteppingNavigator.DescendantAxisIterator,StringValue.CharacterIterator,StringValue.UnicodeCharacterIterator,TreeEnumeration,VirtualCopy.VirtualCopier,Whitespace.Tokenizer,WrappingIterator
A SequenceIterator is used to iterate over a sequence. An UnfailingIterator
is a SequenceIterator that throws no checked exceptions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator
SequenceIterator.Property -
Method Summary
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materialize
-
Method Details
-
next
Item next()Get the next item in the sequence.- Specified by:
nextin interfaceSequenceIterator- Returns:
- the next Item. If there are no more items, return null.
-
forEach
Process all the items returned by the iterator, supplying them to a givenConsumer. Note that this method throws no exceptions. This method consumes the iterator.- Parameters:
consumer- the function that is to consume each of the (remaining) items returned by the iterator
-
toList
Create a list containing all the items returned by the iterator. This method consumes the iterator.- Returns:
- a list containing all the (remaining) items returned by the iterator
-