Class Choice2._B<A,B>
- java.lang.Object
-
- com.jnape.palatable.lambda.adt.choice.Choice2<A,B>
-
- com.jnape.palatable.lambda.adt.choice.Choice2._B<A,B>
-
- All Implemented Interfaces:
CoProduct2<A,B,Choice2<A,B>>,Applicative<B,Choice2<A,?>>,Bifunctor<A,B,Choice2<?,?>>,BoundedBifunctor<A,B,java.lang.Object,java.lang.Object,Choice2<?,?>>,Functor<B,Choice2<A,?>>,Monad<B,Choice2<A,?>>,MonadRec<B,Choice2<A,?>>,Traversable<B,Choice2<A,?>>
private static final class Choice2._B<A,B> extends Choice2<A,B>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()<R> Rmatch(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)Type-safe convergence requiring a match against all potential types.java.lang.StringtoString()-
Methods inherited from class com.jnape.palatable.lambda.adt.choice.Choice2
a, b, biMap, biMapL, biMapR, discardL, discardR, diverge, flatMap, fmap, invert, lazyZip, project, pure, pureChoice, trampolineM, traverse, zip
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.jnape.palatable.lambda.adt.coproduct.CoProduct2
embed, projectA, projectB
-
-
-
-
Field Detail
-
b
private final B b
-
-
Constructor Detail
-
_B
private _B(B b)
-
-
Method Detail
-
match
public <R> R match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
Description copied from interface:CoProduct2Type-safe convergence requiring a match against all potential types.- Type Parameters:
R- result type- Parameters:
aFn- morphismA -> RbFn- morphismB -> R- Returns:
- the result of applying the appropriate morphism to this coproduct's unwrapped value
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-