Class OptionalStep6<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
    F - The type of the sixth defined value

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

    Since:
    4.7.0
    See Also:
    for usage examples, Optional
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Optional<A> optional1  
      private java.util.Optional<B> optional2  
      private java.util.Optional<C> optional3  
      private java.util.Optional<D> optional4  
      private java.util.Optional<E> optional5  
      private java.util.Optional<F> optional6  
    • Constructor Summary

      Constructors 
      Constructor Description
      OptionalStep6​(java.util.Optional<A> optional1, java.util.Optional<B> optional2, java.util.Optional<C> optional3, java.util.Optional<D> optional4, java.util.Optional<E> optional5, java.util.Optional<F> optional6)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      OptionalStep6<A,​B,​C,​D,​E,​F> filter​(Predicate6<? super A,​? super B,​? super C,​? super D,​? super E,​? super F> predicate)
      Apply the provided predicate with the previous step results.
      <Z> java.util.Optional<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 of
      • Methods inherited from class java.lang.Object

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

      • optional1

        private final java.util.Optional<A> optional1
      • optional2

        private final java.util.Optional<B> optional2
      • optional3

        private final java.util.Optional<C> optional3
      • optional4

        private final java.util.Optional<D> optional4
      • optional5

        private final java.util.Optional<E> optional5
      • optional6

        private final java.util.Optional<F> optional6
    • Constructor Detail

      • OptionalStep6

        OptionalStep6​(java.util.Optional<A> optional1,
                      java.util.Optional<B> optional2,
                      java.util.Optional<C> optional3,
                      java.util.Optional<D> optional4,
                      java.util.Optional<E> optional5,
                      java.util.Optional<F> optional6)
    • Method Detail

      • filter

        public OptionalStep6<A,​B,​C,​D,​E,​F> filter​(Predicate6<? super A,​? super B,​? super C,​? super D,​? super E,​? super F> predicate)
        Apply the provided predicate with the previous step results.
        Parameters:
        predicate - The check that must be satisfied by contained values
        Returns:
        This step class with either the same last step value, or changed to empty
      • yield

        public <Z> java.util.Optional<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 of
        Type Parameters:
        Z - The type for the returned result
        Parameters:
        functor - The yield function to map on previous values
        Returns:
        An Optional containing this result or empty