Class OperatorNode<LEFT,​RIGHT>

    • Constructor Detail

      • OperatorNode

        public OperatorNode​(Operation anOperation,
                            Object aLeftOperand,
                            Object aRightOperand)
        Creates an instance.
        Parameters:
        aLeftOperand - the left operand
        aRightOperand - the right operand
    • Method Detail

      • evaluateInternal

        protected abstract Object evaluateInternal​(LEFT aLeftOperand,
                                                   RIGHT aRightOperand)
                                            throws UnexecutableException
        Must be implemented by subclasses to implement the actual evaluation of this node. It will get evaluated and converted operands and needs to return the result of the evaluation.
        Parameters:
        aLeftOperand - the evaluated left operand
        aRightOperand - the evaluated right operand
        Returns:
        the result of the evaluation
        Throws:
        UnexecutableException