Class TryStep6<A,​B,​C,​D,​E,​F>

  • Type Parameters:
    A - The type of the first defined value
    B - The type of the second defined value
    C - The type of the third defined value
    D - The type of the fourth defined value
    E - The type of the fifth defined value
    E - The type of the sixth defined value

    public final class TryStep6<A,​B,​C,​D,​E,​F>
    extends java.lang.Object
    The sixth step of the 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)

    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 a Success
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • try1

        private final Try<A> try1
      • try2

        private final Try<B> try2
      • try3

        private final Try<C> try3
      • try4

        private final Try<D> try4
      • try5

        private final Try<E> try5
      • try6

        private final Try<F> try6
    • 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 values
        unsatisfiedSupplier - 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 a Success
        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