Class FutureIterator<T>
java.lang.Object
com.github.basking2.sdsai.itrex.iterators.FutureIterator<T>
-
Constructor Summary
ConstructorDescriptionFutureIterator
(Iterator<T> iterator, Executor executor) Create a new FutureIterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
FutureIterator
Create a new FutureIterator.- Parameters:
iterator
- A thread-safe iterator.executor
- The executorFuture
s will be completed in.
-
-
Method Details
-
hasNext
public boolean hasNext()Return true if there are more elements in the source iterator. This call is not reliable as a call toIterator.next()
may be happening as this call returns.- Specified by:
hasNext
in interfaceIterator<T>
- Returns:
- true if, at the moment
Iterator.hasNext()
is called on the wrapped iterator, it returns true. False otherwise.
-
next
-