Interface Bifunctor<A,B,BF extends Bifunctor<?,?,BF>>
-
- Type Parameters:
A
- The type of the left parameterB
- The type of the right parameterBF
- The unification parameter
- All Superinterfaces:
BoundedBifunctor<A,B,java.lang.Object,java.lang.Object,BF>
- All Known Implementing Classes:
Choice2
,Choice2._A
,Choice2._B
,Choice3
,Choice3._A
,Choice3._B
,Choice3._C
,Choice4
,Choice4._A
,Choice4._B
,Choice4._C
,Choice4._D
,Choice5
,Choice5._A
,Choice5._B
,Choice5._C
,Choice5._D
,Choice5._E
,Choice6
,Choice6._A
,Choice6._B
,Choice6._C
,Choice6._D
,Choice6._E
,Choice6._F
,Choice7
,Choice7._A
,Choice7._B
,Choice7._C
,Choice7._D
,Choice7._E
,Choice7._F
,Choice7._G
,Choice8
,Choice8._A
,Choice8._B
,Choice8._C
,Choice8._D
,Choice8._E
,Choice8._F
,Choice8._G
,Choice8._H
,Const
,Either
,Either.Left
,Either.Right
,EitherT
,RecursiveResult
,RecursiveResult.Recurse
,RecursiveResult.Terminate
,These
,These._A
,These._B
,These.Both
,Tuple2
,Tuple3
,Tuple4
,Tuple5
,Tuple6
,Tuple7
,Tuple8
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Bifunctor<A,B,BF extends Bifunctor<?,?,BF>> extends BoundedBifunctor<A,B,java.lang.Object,java.lang.Object,BF>
A dually-parametric functor that maps covariantly over both parameters.For more information, read about Bifunctors.
- See Also:
Functor
,Profunctor
,Tuple2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <C,D>
Bifunctor<C,D,BF>biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.default <C> Bifunctor<C,B,BF>
biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.default <C> Bifunctor<A,C,BF>
biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.
-
-
-
Method Detail
-
biMapL
default <C> Bifunctor<C,B,BF> biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.
-
biMapR
default <C> Bifunctor<A,C,BF> biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter. For all bifunctors that are also functors, it should hold thatbiMapR(f) == fmap(f)
.
-
biMap
<C,D> Bifunctor<C,D,BF> biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters. This is isomorphic tobiMapL(lFn).biMapR(rFn)
.- Specified by:
biMap
in interfaceBoundedBifunctor<A,B,java.lang.Object,java.lang.Object,BF extends Bifunctor<?,?,BF>>
- Type Parameters:
C
- the new left parameter typeD
- the new right parameter type- Parameters:
lFn
- the left parameter mapping functionrFn
- the right parameter mapping function- Returns:
- a bifunctor over C (the new left parameter type) and D (the new right parameter type)
-
-