Class Choice4._A<A,B,C,D>

java.lang.Object
com.jnape.palatable.lambda.adt.choice.Choice4<A,B,C,D>
com.jnape.palatable.lambda.adt.choice.Choice4._A<A,B,C,D>
All Implemented Interfaces:
CoProduct4<A, B, C, D, Choice4<A,B,C,D>>, Applicative<D, Choice4<A,B,C,?>>, Bifunctor<C, D, Choice4<A,B,?,?>>, BoundedBifunctor<C, D, Object, Object, Choice4<A,B,?,?>>, Functor<D, Choice4<A,B,C,?>>, Monad<D, Choice4<A,B,C,?>>, MonadRec<D, Choice4<A,B,C,?>>, Traversable<D, Choice4<A,B,C,?>>
Enclosing class:
Choice4<A,B,C,D>

private static final class Choice4._A<A,B,C,D> extends Choice4<A,B,C,D>
  • Field Details

    • a

      private final A a
  • Constructor Details

    • _A

      private _A(A a)
  • Method Details

    • match

      public <R> R match(Fn1<? super A, ? extends R> aFn, Fn1<? super B, ? extends R> bFn, Fn1<? super C, ? extends R> cFn, Fn1<? super D, ? extends R> dFn)
      Description copied from interface: CoProduct4
      Type-safe convergence requiring a match against all potential types.
      Type Parameters:
      R - result type
      Parameters:
      aFn - morphism A -> R
      bFn - morphism B -> R
      cFn - morphism C -> R
      dFn - morphism D -> R
      Returns:
      the result of applying the appropriate morphism from whichever type is represented by this coproduct to R
      See Also:
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object