Package | Description |
---|---|
com.ibm.asyncutil.iteration |
Provides support for asynchronous loop constructs.
|
com.ibm.asyncutil.util |
Provides general purpose utilities for using
CompletionStage . |
Modifier and Type | Method | Description |
---|---|---|
static <T> Either<AsyncIterator.End,T> |
AsyncIterator.End.end() |
An
Either instance which contains the AsyncIterator.End enum. |
Modifier and Type | Method | Description |
---|---|---|
static <T> CompletionStage<Either<AsyncIterator.End,T>> |
AsyncIterator.End.endStage() |
A
CompletionStage which is already complete, and contains the AsyncIterator.End.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.
|
Modifier and Type | Method | Description |
---|---|---|
default <V> Either<L,V> |
Either.flatMap(Function<? super R,? extends Either<L,V>> f) |
Transforms the right type of
this , producing a right Either of type V if
this was right and f produced a right Either, or a left Either otherwise. |
static <A,B> Either<A,B> |
Either.left(A a) |
Constructs an Either with a left value
|
default <A,B> Either<A,B> |
Either.map(Function<? super L,? extends A> leftFn,
Function<? super R,? extends B> rightFn) |
Creates a new Either possibly of two new and distinct types, by applying the provided
transformation functions.
|
default <V> Either<L,V> |
Either.map(Function<? super R,? extends V> fn) |
Transforms the right type of
this , producing an Either of the transformed value if
this contained right, or an Either of the original left value otherwise. |
static <A,B> Either<A,B> |
Either.right(B b) |
Constructs an Either with a right value
|
Modifier and Type | Method | Description |
---|---|---|
default <V> Either<L,V> |
Either.flatMap(Function<? super R,? extends Either<L,V>> f) |
Transforms the right type of
this , producing a right Either of type V if
this was right and f produced a right Either, or a left Either otherwise. |
Copyright © 2018. All rights reserved.