java.lang.Object
com.maroontress.intexpr.impl.Operations
This class provides the utility methods for operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
perform
(com.maroontress.clione.Token t, IntSupplier s) Performs an operation.
-
Method Details
-
perform
Performs an operation.- Parameters:
t
- The token corresponding to the operator.s
- The supplier that represents the operation consisting of both an operator and its operand(s), supplying the result value.- Returns:
- The result of evaluating
s
. - Throws:
ArithmeticException
- If there is an attempt to divide an integer value by zero, or if an arithmetic operation results in an overflow.
-