Class Calculator.AnyPlusAny

java.lang.Object
net.sf.saxon.expr.Calculator
net.sf.saxon.expr.Calculator.AnyPlusAny
Enclosing class:
Calculator

public static class Calculator.AnyPlusAny extends Calculator
Arithmetic: anyAtomicType + AnyAtomicType
  • Constructor Details Link icon

    • AnyPlusAny Link icon

      public AnyPlusAny()
  • Method Details Link icon

    • compute Link icon

      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 Link icon

      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