Class Calculator.DoublePlusDouble

    • Constructor Detail

      • DoublePlusDouble

        public DoublePlusDouble()
    • Method Detail

      • compute

        public AtomicValue compute​(AtomicValue a,
                                   AtomicValue b,
                                   XPathContext c)
                            throws XPathException
        Description copied from class: Calculator
        Perform an arithmetic operation
        Specified by:
        compute in class Calculator
        Parameters:
        a - the first operand. Must not be null, and must be an instance of the type implied by the class name.
        b - the second operand. Must not be null, and must be an instance of the type implied by the class name.
        c - the XPath dynamic evaluation context
        Returns:
        the result of the computation, as a value of the correct primitive type
        Throws:
        XPathException - in the event of an arithmetic error
      • getResultType

        public AtomicType getResultType​(AtomicType typeA,
                                        AtomicType typeB)
        Description copied from class: Calculator
        Get the type of the result of the calculator, given arguments types typeA and typeB
        Specified by:
        getResultType in class Calculator
        Parameters:
        typeA - the type of the first operand
        typeB - the type of the second operand
        Returns:
        the type of the result