Package net.sf.saxon.tree.iter
Interface UnfailingIterator
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,SequenceIterator
- All Known Subinterfaces:
AtomicIterator<T>,AxisIterator,ConstrainedIterator<T>
- All Known Implementing Classes:
AncestorIterator,ArrayIterator,ArrayIterator.OfNodes,ATokenIterator,AttributeIterator,AxiomDocument.FollowingSiblingIterator,AxiomDocument.PrecedingSiblingIterator,AxiomDocumentNodeWrapper.FollowingSiblingIterator,AxiomDocumentNodeWrapper.PrecedingSiblingIterator,AxiomParentNodeWrapper.ChildWrappingIterator,AxiomParentNodeWrapper.DescendantWrappingIterator,BigRangeIterator,ConcatenatingAxisIterator,EmptyIterator,GroupByIterator.ManualGroupByIterator,JTokenIterator,ListIterator,ListIterator.Atomic,ListIterator.OfNodes,ManualGroupIterator,ManualIterator,ManualRegexIterator,MergeGroupingIterator.ManualMergeGroupingIterator,Navigator.AncestorEnumeration,Navigator.AxisFilter,Navigator.DescendantEnumeration,Navigator.EmptyTextFilter,Navigator.FollowingEnumeration,Navigator.PrecedingEnumeration,NodeWrappingAxisIterator,PrependAxisIterator,RangeIterator,ReverseListIterator,ReverseRangeIterator,SingleAtomicIterator,SingleNodeIterator,SingletonIterator,SteppingNavigator.DescendantAxisIterator,StringValue.CharacterIterator,StringValue.UnicodeCharacterIterator,VirtualCopy.VirtualCopier,Whitespace.Tokenizer,WrappingIterator
public interface UnfailingIterator extends SequenceIterator
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidforEach(java.util.function.Consumer<? super Item> consumer)Process all the items returned by the iterator, supplying them to a givenConsumer.Itemnext()Get the next item in the sequence.default java.util.List<Item>toList()Create a list containing all the items returned by the iterator.-
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, forEachOrFail, getProperties, materialize
-
-
-
-
Method Detail
-
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
default void forEach(java.util.function.Consumer<? super Item> consumer)
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
default java.util.List<Item> 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
-
-