Class UnaryOperation

    • Field Detail

      • m_right

        protected Expression m_right
        The operand for the operation.
    • Constructor Detail

      • UnaryOperation

        public UnaryOperation()
    • Method Detail

      • canTraverseOutsideSubtree

        public boolean canTraverseOutsideSubtree()
        Tell if this expression or it's subexpressions can traverse outside the current subtree.
        Overrides:
        canTraverseOutsideSubtree in class Expression
        Returns:
        true if traversal outside the context node's subtree can occur.
      • setRight

        public void setRight​(Expression r)
        Set the expression operand for the operation.
        Parameters:
        r - The expression operand to which the unary operation will be applied.
      • execute

        public XObject execute​(XPathContext xctxt)
                        throws javax.xml.transform.TransformerException
        Execute an expression in the XPath runtime context, and return the result of the expression.
        Specified by:
        execute in class Expression
        Parameters:
        xctxt - The XPath runtime context.
        Returns:
        The result of the expression in the form of a XObject.
        Throws:
        javax.xml.transform.TransformerException - if a runtime exception occurs.
      • operate

        public abstract XObject operate​(XObject right)
                                 throws javax.xml.transform.TransformerException
        Apply the operation to two operands, and return the result.
        Parameters:
        right - non-null reference to the evaluated right operand.
        Returns:
        non-null reference to the XObject that represents the result of the operation.
        Throws:
        javax.xml.transform.TransformerException - in case of error
      • callVisitors

        public void callVisitors​(XPathVisitor visitor)
        This will traverse the hierarchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.
        Parameters:
        visitor - The visitor whose appropriate method will be called.
      • deepEquals

        public boolean deepEquals​(Expression expr)
        Compare this object with another object and see if they are equal, include the sub heararchy.
        Specified by:
        deepEquals in class Expression
        Parameters:
        expr - Another expression object.
        Returns:
        true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.