Package net.sf.saxon.tree.jiter
Class ConcatenatingIterator<E>
- java.lang.Object
-
- net.sf.saxon.tree.jiter.ConcatenatingIterator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
public class ConcatenatingIterator<E> extends java.lang.Object implements java.util.Iterator<E>
An iterator over nodes, that concatenates the nodes returned by two supplied iterators.
-
-
Constructor Summary
Constructors Constructor Description ConcatenatingIterator(java.util.Iterator<? extends E> first, java.util.function.Supplier<java.util.Iterator<? extends E>> second)
Create an iterator that concatenates the results of two supplied iterators.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
E
next()
Get the next item in the sequence.
-
-
-
Constructor Detail
-
ConcatenatingIterator
public ConcatenatingIterator(java.util.Iterator<? extends E> first, java.util.function.Supplier<java.util.Iterator<? extends E>> second)
Create an iterator that concatenates the results of two supplied iterators. The second iterator isn't created until it is actually needed.- Parameters:
first
- the first iteratorsecond
- a function that can be called to supply the second iterator
-
-