public interface CalculatorEngine
Modifier and Type | Method and Description |
---|---|
Data |
calculate(java.lang.Enum<?> operatorId,
Data... operands)
Performs calculation by applying the specified operation to the operands.
|
boolean |
isSupported(java.lang.Enum<?> operatorId,
Data... operands)
Checks whether the specified operation is supported for the provided operands.
|
boolean isSupported(java.lang.Enum<?> operatorId, Data... operands)
operatorId
- Operator identifier. Identifies an operation within a group.operands
- Array of operands.true
if the operation is supported for the given operand types or false
if it is not supported or its invariants are violated (e.g. operand types do not
match).Data calculate(java.lang.Enum<?> operatorId, Data... operands)
operatorId
- Operator identifier. Identifies an operation within a group.operands
- Array of operands.java.lang.UnsupportedOperationException
- if the operation is not supported or its invariants are
violated (e.g. operand types do not match).