Class CoreOperationNegate


  • public class CoreOperationNegate
    extends CoreOperation
    Implementation of Expression for the operation unary "-".
    Version:
    $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
    Author:
    Dmitri Plotnikov
    • Constructor Detail

      • CoreOperationNegate

        public CoreOperationNegate​(Expression arg)
        Create a new CoreOperationNegate.
        Parameters:
        arg - the Expression to negate
    • Method Detail

      • computeValue

        public java.lang.Object computeValue​(EvalContext context)
        Description copied from class: Expression
        Evaluates the expression. If the result is a node set, returns the first element of the node set.
        Specified by:
        computeValue in class CoreOperation
        Parameters:
        context - evaluation context
        Returns:
        Object
      • getPrecedence

        protected int getPrecedence()
        Description copied from class: CoreOperation
        Computes the precedence of the operation.
        Specified by:
        getPrecedence in class CoreOperation
        Returns:
        int precedence
      • isSymmetric

        protected boolean isSymmetric()
        Description copied from class: CoreOperation
        Returns true if the operation is not sensitive to the order of arguments, e.g. "=", "and" etc, and false if it is, e.g. "<=", "div".
        Specified by:
        isSymmetric in class CoreOperation
        Returns:
        boolean
      • getSymbol

        public java.lang.String getSymbol()
        Description copied from class: CoreOperation
        Returns the XPath symbol for this operation, e.g. "+", "div", etc.
        Specified by:
        getSymbol in class CoreOperation
        Returns:
        String symbol