net.sf.jga.fn
public abstract class AbstractBinaryFunctor<T1,T2,R> extends Object implements BinaryFunctor<T1,T2,R>
Method Summary | |
---|---|
void | accept(Visitor v)
No-op implementation of Visitable interface. |
UnaryFunctor<T2,R> | bind1st(T1 value)
Factory method that creates a UnaryFunctor that binds a constant value to
this' first argument. |
UnaryFunctor<T1,R> | bind2nd(T2 value)
Factory method that creates a UnaryFunctor that binds a constant value to
this' second argument. |
<F> UnaryFunctor<F,R> | compose(UnaryFunctor<F,T1> g, UnaryFunctor<F,T2> h)
FactoryMethod that creates a UnaryFunctor that passes its argument to
each of the given functors, and uses the results as the arguments to this
function. |
<F1,F2> BinaryFunctor<F1,F2,R> | compose(BinaryFunctor<F1,F2,T1> g, BinaryFunctor<F1,F2,T2> h)
FactoryMethod that creates a BinaryFunctor that passes its arguments to
each of the given functors, and uses the results as the arguments to this
function. |
<F1,F2> BinaryFunctor<F1,F2,R> | distribute(UnaryFunctor<F1,T1> g, UnaryFunctor<F2,T2> h)
FactoryMethod that creates a BinaryFunctor that passes each of its two
arguments to a pair of UnaryFunctors, then uses the results as arguments
to this function. |
fnthis(value, x)
fnthis(x, value)
fnthis(g(x), h(x))
fnthis(g(x,y), h(x,y))
fnthis(g(x), h(y))
. Note: this
method cannot be called compose, as it is only distinct from the unary
form of compose in its param types and its return type