jfun.jaskell.function
Class DelegatingFunction
java.lang.Object
jfun.jaskell.function.DelegatingFunction
- All Implemented Interfaces:
- java.io.Serializable, Function
public class DelegatingFunction
- extends java.lang.Object
- implements Function
- See Also:
- Serialized Form
Method Summary |
Function |
alone()
|
java.lang.Object |
apply(java.lang.Object[] args)
Call the function with an array of arguments. |
java.lang.Object |
apply(java.lang.Object[] args,
int from,
int len)
Call the function with arguments stored in array args. |
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
f(java.lang.Object arg)
Call the function with one argument. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DelegatingFunction
public DelegatingFunction(Function f)
apply
public java.lang.Object apply(java.lang.Object[] args,
int from,
int len)
- Description copied from interface:
Function
- Call the function with arguments stored in array args.
Only objects in the range [from, from+len) are used.
- Specified by:
apply
in interface Function
- Parameters:
args
- the array.from
- the starting index of the range.len
- the length of the range.
- Returns:
- the return value.
apply
public java.lang.Object apply(java.lang.Object[] args)
- Description copied from interface:
Function
- Call the function with an array of arguments.
- Specified by:
apply
in interface Function
- Parameters:
args
- the arguments.
- Returns:
- the return value.
f
public java.lang.Object f(java.lang.Object arg)
- Description copied from interface:
Function
- Call the function with one argument.
- Specified by:
f
in interface Function
- Parameters:
arg
- the argument.
- Returns:
- the return value.
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
alone
public Function alone()