blob: fdacac05b2293fe24f07c05e5372d8bb1842f5ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package jcgp.backend.function;
/**
* Function is a callback wrapper.
* <br><br>
* A concrete implementation of Function overrides {@code run()} to perform
* any arbitrary operation on the arguments specified. It must also override
* {@code getArity()} to return the function arity.
*
*
* @author Eduardo Pedroni
*
*/
public abstract class Function {
/**
* Executes the function.
*
* @param args the function arguments
* @return the function result
*/
public abstract Object run(Object... args);
/**
* @return the arity of the function.
*/
public abstract int getArity();
}
|