info.javelot.functionalj
Class Function3Impl<R,P1,P2,P3>

java.lang.Object
  extended by info.javelot.functionalj.Function3Impl<R,P1,P2,P3>
All Implemented Interfaces:
Function3<R,P1,P2,P3>

public abstract class Function3Impl<R,P1,P2,P3>
extends Object
implements Function3<R,P1,P2,P3>

A base implementation of the Function3 interface, which implements all methods except for the Function3.call(Object,Object,Object) method - that is left to subclasses to implement in order to define a function of 3 parameters.

Author:
Copyright © 2006 Frederic Daoud

Constructor Summary
Function3Impl()
           
 
Method Summary
 Function2<R,P2,P3> bind(P1 p_param1)
          Binds the first parameter of this function of 3 parameters to return a new function of 2 parameters.
 Function1<R,P3> bind(P1 p_param1, P2 p_param2)
          Binds the first 2 parameters of this function of 3 parameters to return a new function of 1 parameter.
 Function0<R> bind(P1 p_param1, P2 p_param2, P3 p_param3)
          Binds the 3 parameters of this function of 3 parameters to return a new function of no parameters.
 Function2<R,P1,P3> bind2(P2 p_param2)
          Binds the second parameter of this function of 3 parameters to return a new function of 2 parameters.
 Function2<R,P1,P2> bind3(P3 p_param3)
          Binds the third parameter of this function of 3 parameters to return a new function of 2 parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.javelot.functionalj.Function3
call
 

Constructor Detail

Function3Impl

public Function3Impl()
Method Detail

bind

public Function2<R,P2,P3> bind(P1 p_param1)
Description copied from interface: Function3
Binds the first parameter of this function of 3 parameters to return a new function of 2 parameters.

Specified by:
bind in interface Function3<R,P1,P2,P3>
Parameters:
p_param1 - the parameter to bind to the first parameter of the function.
Returns:
a new function of 2 parameters.

bind

public Function1<R,P3> bind(P1 p_param1,
                            P2 p_param2)
Description copied from interface: Function3
Binds the first 2 parameters of this function of 3 parameters to return a new function of 1 parameter.

Specified by:
bind in interface Function3<R,P1,P2,P3>
Parameters:
p_param1 - the parameter to bind to the first parameter of the function.
p_param2 - the parameter to bind to the second parameter of the function.
Returns:
a new function of 1 parameter.

bind

public Function0<R> bind(P1 p_param1,
                         P2 p_param2,
                         P3 p_param3)
Description copied from interface: Function3
Binds the 3 parameters of this function of 3 parameters to return a new function of no parameters.

Specified by:
bind in interface Function3<R,P1,P2,P3>
Parameters:
p_param1 - the parameter to bind to the first parameter of the function.
p_param2 - the parameter to bind to the second parameter of the function.
p_param3 - the parameter to bind to the third parameter of the function.
Returns:
a new function of no parameters.

bind2

public Function2<R,P1,P3> bind2(P2 p_param2)
Description copied from interface: Function3
Binds the second parameter of this function of 3 parameters to return a new function of 2 parameters.

Specified by:
bind2 in interface Function3<R,P1,P2,P3>
Parameters:
p_param2 - the parameter to bind to the second parameter of the function.
Returns:
a new function of 2 parameters.

bind3

public Function2<R,P1,P2> bind3(P3 p_param3)
Description copied from interface: Function3
Binds the third parameter of this function of 3 parameters to return a new function of 2 parameters.

Specified by:
bind3 in interface Function3<R,P1,P2,P3>
Parameters:
p_param3 - the parameter to bind to the third parameter of the function.
Returns:
a new function of 2 parameters.