Package net.sf.saxon.z
Class ConcatenatingIntIterator
java.lang.Object
net.sf.saxon.z.ConcatenatingIntIterator
- All Implemented Interfaces:
IntIterator
An iterator over nodes, that concatenates the nodes returned by two supplied iterators.
-
Constructor Summary
ConstructorsConstructorDescriptionConcatenatingIntIterator
(IntIterator first, Supplier<IntIterator> second) Create an iterator that concatenates the results of two supplied iterator. -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Test whether there are any more integers in the sequence; and change the state of the iterator so a call onIntIterator.next()
delivers the next integer.int
next()
Get the next item in the sequence.
-
Constructor Details
-
ConcatenatingIntIterator
Create an iterator that concatenates the results of two supplied iterator. 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
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:IntIterator
Test whether there are any more integers in the sequence; and change the state of the iterator so a call onIntIterator.next()
delivers the next integer.The effect of calling
#hasNext()
a second time without an intervening call on#next()
is undefined.- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- true if there are more integers to come
-
next
public int next()Get the next item in the sequence.- Specified by:
next
in interfaceIntIterator
- Returns:
- the next Item. If there are no more items, return null.
-