A - The type of the first defined valueB - The type of the second defined valueC - The type of the third defined valuepublic final class OptionalStep3<A,B,C> extends Object
Optional 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(Optional)
for usage examples,
Optional| Modifier and Type | Method and Description |
|---|---|
OptionalStep3<A,B,C> |
filter(Predicate3<? super A,? super B,? super C> predicate)
Apply the provided predicate with the previous step results.
|
<D> OptionalStep4<A,B,C,D> |
then(Function3<? super A,? super B,? super C,Optional<D>> functor)
Apply the provided function with the previous Step results.
|
<D> OptionalStep4<A,B,C,D> |
then(Supplier<Optional<D>> supplier)
Apply the provided supplier with the previous Step results.
|
<Z> Optional<Z> |
yield(Function3<? super A,? super B,? super C,Z> functor)
Terminating step expression, that will provide the previous steps to this
function and return the result as a
of |
public <D> OptionalStep4<A,B,C,D> then(Function3<? super A,? super B,? super C,Optional<D>> functor)
Internally this will perform a Optional.flatMap(Function) and the
result will become the next step value.
D - The type of the next step resultfunctor - The functor to be applied as a flatMap with the previous
stepspublic <D> OptionalStep4<A,B,C,D> then(Supplier<Optional<D>> supplier)
Internally this will perform a Optional.flatMap(Function) and the
supplier will become the next step value.
This is different to then(Function3) in that the previous step
results are not provided for the new step evaluation.
D - The type of the next step resultsupplier - The supplier to provide the result of the flatMap with the
previous step.public OptionalStep3<A,B,C> filter(Predicate3<? super A,? super B,? super C> predicate)
predicate - The check that must be satisfied by contained valuespublic <Z> Optional<Z> yield(Function3<? super A,? super B,? super C,Z> functor)
ofZ - The type for the returned resultfunctor - The yield function to map on previous valuesCopyright © 2018 Atlassian. All rights reserved.