Package io.vertigo.commons.peg.term
Interface PegOperatorTerm<T>
- Type Parameters:
T- the type of operands used by this operator
- All Superinterfaces:
PegTerm
- All Known Implementing Classes:
PegArithmeticsOperatorTerm,PegBoolOperatorTerm
Interface for all operator terms. Operators have a priority of execution and can be applied to two operands.
- Author:
- skerdudou
-
Method Summary
Modifier and TypeMethodDescriptionApply the operator to the two operands.intGet the priority of the operator.Methods inherited from interface io.vertigo.commons.peg.term.PegTerm
getStrValues
-
Method Details
-
getPriority
int getPriority()Get the priority of the operator. Higher is the priority, earlier the operator is executed.- Returns:
- the priority of the operator
-
apply
Apply the operator to the two operands.- Parameters:
left- the left operandright- the right operand- Returns:
- the result of the operation
- Throws:
PegParsingValueException- if the operator cannot be applied to the operands
-