Class SubtractionNode


  • public class SubtractionNode
    extends OperatorNode<java.math.BigDecimal,​java.math.BigDecimal>
    Subtracts one value from the other.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Summary

      Constructors 
      Constructor Description
      SubtractionNode​(Operation anOperation, java.lang.Object aLeftOperand, java.lang.Object aRightOperand)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object evaluateInternal​(java.math.BigDecimal aLeftOperand, java.math.BigDecimal aRightOperand)
      Must be implemented by subclasses to implement the actual evaluation of this node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubtractionNode

        public SubtractionNode​(Operation anOperation,
                               java.lang.Object aLeftOperand,
                               java.lang.Object aRightOperand)
        Creates a new instance.
        Parameters:
        aLeftOperand -
        aRightOperand -
    • Method Detail

      • evaluateInternal

        protected java.lang.Object evaluateInternal​(java.math.BigDecimal aLeftOperand,
                                                    java.math.BigDecimal aRightOperand)
                                             throws UnexecutableException
        Description copied from class: OperatorNode
        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.
        Specified by:
        evaluateInternal in class OperatorNode<java.math.BigDecimal,​java.math.BigDecimal>
        Parameters:
        aLeftOperand - the evaluated left operand
        aRightOperand - the evaluated right operand
        Returns:
        the result of the evaluation
        Throws:
        UnexecutableException