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,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._A<A,B> extends Choice2<A,B>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
hashCode()
<R> R
match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
Type-safe convergence requiring a match against all potential types.java.lang.String
toString()
-
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
-
a
private final A a
-
-
Constructor Detail
-
_A
private _A(A a)
-
-
Method Detail
-
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
- morphismA -> R
bFn
- 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-