Class DivisionNode


  • public class DivisionNode
    extends OperatorNode<Double,​Double>
    Divides two numbers. Uses double values as input since BigDecimals cannot always be divided, for example in case of periodic results.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Detail

      • DivisionNode

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

      • evaluateInternal

        protected Object evaluateInternal​(Double aLeftOperand,
                                          Double 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<Double,​Double>
        Parameters:
        aLeftOperand - the evaluated left operand
        aRightOperand - the evaluated right operand
        Returns:
        the result of the evaluation
        Throws:
        UnexecutableException