| Constructor and Description |
|---|
CalculatorOperation(OperationId id,
ArityRange arity) |
| Modifier and Type | Method and Description |
|---|---|
abstract 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.
|
public CalculatorOperation(OperationId id, ArityRange arity)
public OperationId getOperationId()
OperationgetOperationId in interface Operation<OperationId extends java.lang.Enum<OperationId>>public ArityRange getOperationArity()
OperationgetOperationArity in interface Operation<OperationId extends java.lang.Enum<OperationId>>public boolean validTypes(Data... operands)
OperationvalidTypes in interface Operation<OperationId extends java.lang.Enum<OperationId>>public abstract Data calculate(Data... operands)
Operationcalculate in interface Operation<OperationId extends java.lang.Enum<OperationId>>operands - A variable of operands.