- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The code that each operator executes.
-
Method Summary
Modifier and TypeMethodDescriptionint
execute
(int[] stack, int offset, com.maroontress.clione.Token token) Interacts with the specified stack and returns the new offset of the stack.
-
Method Details
-
execute
int execute(int[] stack, int offset, com.maroontress.clione.Token token) Interacts with the specified stack and returns the new offset of the stack.- Parameters:
stack
- The stack of integers.offset
- The offset representing the top of the stack.token
- The token corresponding to the operator.- Returns:
- The new offset.
- Throws:
DivideByZeroException
- If there is an attempt to divide an integer value by zero.OverflowException
- If an arithmetic operation results in an overflow.
-