OperationId
- Type of the enumeration that describes a group of operations.public interface Operation<OperationId extends java.lang.Enum<OperationId>>
Modifier and Type | Method and Description |
---|---|
Data |
calculate(Data... operands)
Performs an operation on the specified operands.
|
ArityRange |
getOperationArity()
Returns the range that describes the allowed arity of the operation.
|
OperationId |
getOperationId()
Returns the identifier of the operation.
|
boolean |
validTypes(Data... operands)
Performs type check on the specified operands.
|
OperationId getOperationId()
ArityRange getOperationArity()
Data calculate(Data... operands)
operands
- A variable of operands.java.lang.IllegalArgumentException
- if null
is passed to the method.java.lang.UnsupportedOperationException
- if the operation requires a number of arguments which is
different from the one passed to the method.boolean validTypes(Data... operands)