blob: 3124e66337d3fe502123dd669f61071f3298946c (
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
|
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 arguments the function arguments.
* @return the function result.
*/
public abstract Object run(Object... arguments);
/**
* @return the arity of the function.
*/
public abstract int getArity();
}
|