Package org.infinispan.util
Class LazyConcatIterator<E>
- java.lang.Object
-
- org.infinispan.util.LazyConcatIterator<E>
-
- Type Parameters:
E
- element type
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.Iterator<E>
,CloseableIterator<E>
public class LazyConcatIterator<E> extends java.lang.Object implements CloseableIterator<E>
Iterator implementation that will return all entries from the first iterator. Upon completion of the first iterator the supplier will generate an additional iterator that will then be used as a source for this iterator. After the second iterator is consumed this iterator will also be completed.
-
-
Constructor Summary
Constructors Constructor Description LazyConcatIterator(CloseableIterator<E> first, java.util.function.Supplier<? extends CloseableIterator<E>> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
E
next()
-
-
-
Constructor Detail
-
LazyConcatIterator
public LazyConcatIterator(CloseableIterator<E> first, java.util.function.Supplier<? extends CloseableIterator<E>> supplier)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableIterator<E>
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<E>
-
-