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