public final class Signature extends Object
Function
.
A signature includes the return type, the number of arguments and the type of each argument.
Modifier and Type | Method and Description |
---|---|
static Signature |
createSignature(Type returnType,
Type... argumentTypes)
Returns a new
Signature with the specified return type and argument types. |
boolean |
equals(Object o) |
Type |
getArgumentType(int index)
Returns the
Type at the specified position in the arguments of this signature. |
List<Type> |
getArgumentTypes()
Returns an unmodifiable list containing the type of each argument associated with this signature.
|
int |
getArgumentTypesLength()
Returns the number of arguments in this signature.
|
Type |
getReturnType()
Returns the type associated with values returned by the evaluation of functions that have this signature.
|
int |
hashCode() |
String |
toString() |
public static Signature createSignature(Type returnType, Type... argumentTypes)
Signature
with the specified return type and argument types.public Type getReturnType()
public Type getArgumentType(int index)
Type
at the specified position in the arguments of this signature.index
- index of the argument to returnType
at the specified position in the arguments of this signature.ArrayIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getArgumentTypesLength())public int getArgumentTypesLength()
public List<Type> getArgumentTypes()
OakGP Genetic Programming Framework