Package | Description |
---|---|
com.ibm.asyncutil.iteration |
Provides support for asynchronous loop constructs.
|
Modifier and Type | Method | Description |
---|---|---|
static AsyncIterator.End |
AsyncIterator.End.valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static AsyncIterator.End[] |
AsyncIterator.End.values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method | Description |
---|---|---|
static <T> Either<AsyncIterator.End,T> |
AsyncIterator.End.end() |
An
Either instance which contains the AsyncIterator.End enum. |
static <T> CompletionStage<Either<AsyncIterator.End,T>> |
AsyncIterator.End.endStage() |
A
CompletionStage which is already complete, and contains the end()
instance as its value. |
CompletionStage<Either<AsyncIterator.End,T>> |
AsyncIterator.nextStage() |
Returns a stage that will be completed with the next element of
this iterator when it
becomes available, or AsyncIterator.End if there are no more elements. |
Modifier and Type | Method | Description |
---|---|---|
static <T> AsyncIterator<T> |
AsyncIterator.supply(Supplier<? extends CompletionStage<Either<AsyncIterator.End,T>>> supplier) |
Creates an AsyncIterator of type T
|
static <T> AsyncIterator<T> |
AsyncIterator.unfold(T seed,
Function<? super T,? extends CompletionStage<Either<AsyncIterator.End,T>>> f) |
Successively applies the asynchronous function f to the seed until the stage returned by f
contains an empty optional or returns an exception.
|
Copyright © 2018. All rights reserved.