A - The type of the left parameterB - The type of the right parameterContraA - The type of the left parameter upper type boundContraB - The type of the right parameter upper type boundBF - The unification parameter@FunctionalInterface public interface BoundedBifunctor<A extends ContraA,B extends ContraB,ContraA,ContraB,BF extends BoundedBifunctor<?,?,?,?,BF>>
Bifunctor that has both parameter types upper bounded; that is, neither parameters can be mapped to a value
that is not covariant to their respective upper boundsBifunctor| Modifier and Type | Method and Description |
|---|---|
<C extends ContraA,D extends ContraB> |
biMap(Fn1<? super A,? extends C> lFn,
Fn1<? super B,? extends D> rFn)
Dually covariantly map both the left and right parameters into values that are covariant to
ContraA
and ContraB, respectively. |
default <C extends ContraA> |
biMapL(Fn1<? super A,? extends C> fn)
Covariantly map the left parameter into a value that is covariant to
ContraA. |
default <C extends ContraB> |
biMapR(Fn1<? super B,? extends C> fn)
Covariantly map the right parameter into a value that is covariant to
ContraB. |
default <C extends ContraA> BoundedBifunctor<C,B,ContraA,ContraB,BF> biMapL(Fn1<? super A,? extends C> fn)
ContraA.C - the new left parameter typefn - the mapping functiondefault <C extends ContraB> BoundedBifunctor<A,C,ContraA,ContraB,BF> biMapR(Fn1<? super B,? extends C> fn)
ContraB.C - the new right parameter typefn - the mapping function<C extends ContraA,D extends ContraB> BoundedBifunctor<C,D,ContraA,ContraB,BF> biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
ContraA
and ContraB, respectively. This is isomorphic to biMapL(lFn).biMapR(rFn).C - the new left parameter typeD - the new right parameter typelFn - the left parameter mapping functionrFn - the right parameter mapping function