Interface DeferredEnumerableSource<T>
- Type Parameters:
T- the element type of the source
- All Superinterfaces:
EnumerableSource<T>
Represents an unknown length, deferred iterable source which can be moved forward synchronously and obtain the current item via a simple call once it reports said iterable elements are ready to be consumed.
No hasNext and next duplication. C# IEnumerator is way better in this regard.
- Since:
- 4.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns true if the source is ready to be consumed via itsEnumerableSource.nextSync()andEnumerableSource.current()methods.Methods inherited from interface EnumerableSource
current, nextSyncModifier and TypeMethodDescriptioncurrent()Returns the current item ifEnumerableSource.nextSync()returnedtruethe previous call.booleannextSync()Synchronously obtains the next item or returnsfalseif no more items.
-
Method Details
-
enumerableReady
CompletionStage<Boolean> enumerableReady()Returns true if the source is ready to be consumed via itsEnumerableSource.nextSync()andEnumerableSource.current()methods.- Returns:
- the completion stage that indicates an empty
falseor a non-emptytrueenumerable source is now available
-