Class TryStep6<A,B,C,D,E,F>
- java.lang.Object
-
- io.atlassian.fugue.extensions.step.TryStep6<A,B,C,D,E,F>
-
- Type Parameters:
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 valueE- The type of the sixth defined value
public final class TryStep6<A,B,C,D,E,F> extends java.lang.ObjectThe sixth step of theTrytype.This class is not intended to be contructed manually, and should only be used as part of a
Stepschain, started bySteps.begin(Try)- Since:
- 4.7.0
- See Also:
for usage examples,Try
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TryStep6<A,B,C,D,E,F>filter(Predicate6<? super A,? super B,? super C,? super D,? super E,? super F> predicate, java.util.function.Supplier<java.lang.Exception> unsatisfiedSupplier)Apply the provided predicate with the previous step results.<Z> Try<Z>yield(Function6<? super A,? super B,? super C,? super D,? super E,? super F,Z> functor)Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess
-
-
-
Method Detail
-
filter
public TryStep6<A,B,C,D,E,F> filter(Predicate6<? super A,? super B,? super C,? super D,? super E,? super F> predicate, java.util.function.Supplier<java.lang.Exception> unsatisfiedSupplier)
Apply the provided predicate with the previous step results.If the predicate is not satisfied then the unsatisfiedSupplier is used to populate the failure value that will prevent any further steps evaluation.
- Parameters:
predicate- The check that must be satisfied by contained valuesunsatisfiedSupplier- Provide the value to populate the failure if not satisfied- Returns:
- This step class with either the same last step value, or changed to a failure
-
yield
public <Z> Try<Z> yield(Function6<? super A,? super B,? super C,? super D,? super E,? super F,Z> functor)
Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess- Type Parameters:
Z- The type for the returned result- Parameters:
functor- The yield function to map on previous values- Returns:
- A Try containing this result as success or failure
-
-