|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.javelot.functionalj.FunctionNImpl<R>
R - the type of the result returned by the function.public abstract class FunctionNImpl<R>
A base implementation of the FunctionN interface, which implements all
methods except for the FunctionN.call(Object[]) method - that is left to
subclasses to implement in order to define a function of N parameters.
| Constructor Summary | |
|---|---|
FunctionNImpl()
|
|
| Method Summary | |
|---|---|
FunctionN<R> |
bind(int p_index,
Object p_param)
Binds, at the specified index, the given parameter of this function of N parameters to return a new function of (N-1) parameters. |
FunctionN<R> |
bind(Object... p_params)
Binds the given M parameters of this function of N parameters to return a new function of (N-M) parameters. |
R |
call()
Calls the function and returns the result. |
Function0<R> |
f0()
Returns this function as a function of no parameters. |
Function1<R,Object> |
f1()
Returns this function as a function of 1 parameter. |
Function2<R,Object,Object> |
f2()
Returns this function as a function of 2 parameters. |
Function3<R,Object,Object,Object> |
f3()
Returns this function as a function of 3 parameters. |
Function4<R,Object,Object,Object,Object> |
f4()
Returns this function as a function of 4 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.FunctionN |
|---|
call |
| Constructor Detail |
|---|
public FunctionNImpl()
| Method Detail |
|---|
public FunctionN<R> bind(Object... p_params)
FunctionN
bind in interface FunctionN<R>p_params - the M parameters to bind to the function.
public FunctionN<R> bind(int p_index,
Object p_param)
FunctionN
bind in interface FunctionN<R>p_index - the index at which to bind the parameter.p_param - the parameter to bind to the function.
public R call()
throws FunctionException
FunctionN
call in interface FunctionN<R>FunctionException - thrown if an exception occurs during the function
call.public Function0<R> f0()
FunctionN
f0 in interface FunctionN<R>public Function1<R,Object> f1()
FunctionN
f1 in interface FunctionN<R>public Function2<R,Object,Object> f2()
FunctionN
f2 in interface FunctionN<R>public Function3<R,Object,Object,Object> f3()
FunctionN
f3 in interface FunctionN<R>public Function4<R,Object,Object,Object,Object> f4()
FunctionN
f4 in interface FunctionN<R>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||