Class Choice2._A<A,B>

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

private static final class Choice2._A<A,B> extends Choice2<A,B>
  • 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)
      Description copied from interface: CoProduct2
      Type-safe convergence requiring a match against all potential types.
      Type Parameters:
      R - result type
      Parameters:
      aFn - morphism A -> R
      bFn - morphism B -> R
      Returns:
      the result of applying the appropriate morphism to this coproduct's unwrapped value
    • 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