A - The type of the first defined valueB - The type of the second defined valueC - The type of the third defined valueD - The type of the fourth defined valueE - The type of the fifth defined valuepublic final class TryStep5<A,B,C,D,E> extends Object
Try type.
This class is not intended to be contructed manually, and should only be used
as part of a Steps chain, started by Steps.begin(Try)
for usage examples,
Try| Modifier and Type | Method and Description |
|---|---|
TryStep5<A,B,C,D,E> |
filter(Predicate5<? super A,? super B,? super C,? super D,? super E> predicate,
Supplier<Exception> unsatisfiedSupplier)
Apply the provided predicate with the previous step results.
|
<F> TryStep6<A,B,C,D,E,F> |
then(Function5<? super A,? super B,? super C,? super D,? super E,Try<F>> functor)
Apply the provided function with the previous Step results.
|
<F> TryStep6<A,B,C,D,E,F> |
then(Supplier<Try<F>> supplier)
Apply the provided supplier with the previous Step results.
|
<Z> Try<Z> |
yield(Function5<? super A,? super B,? super C,? super D,? super E,Z> functor)
Terminating step expression, that will provide the previous steps to this
function and return the result as a
Success |
public <F> TryStep6<A,B,C,D,E,F> then(Function5<? super A,? super B,? super C,? super D,? super E,Try<F>> functor)
Internally this will perform a Try.flatMap(Function) and the result
will become the next step value.
F - The type of the next step resultfunctor - The functor to be applied as a flatMap with the previous
stepspublic <F> TryStep6<A,B,C,D,E,F> then(Supplier<Try<F>> supplier)
Internally this will perform a Try.flatMap(Function) and the
supplier will become the next step value.
This is different to then(Function5) in that the previous step
results are not provided for the new step evaluation.
F - The type of the next step resultsupplier - The supplier to provide the result of the flatMap with the
previous step.public TryStep5<A,B,C,D,E> filter(Predicate5<? super A,? super B,? super C,? super D,? super E> predicate, Supplier<Exception> unsatisfiedSupplier)
If the predicate is not satisfied then the unsatisfiedSupplier is used to populate the failure value that will prevent any further steps evaluation.
predicate - The check that must be satisfied by contained valuesunsatisfiedSupplier - Provide the value to populate the failure if not
satisfiedpublic <Z> Try<Z> yield(Function5<? super A,? super B,? super C,? super D,? super E,Z> functor)
SuccessZ - The type for the returned resultfunctor - The yield function to map on previous valuesCopyright © 2018 Atlassian. All rights reserved.