Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath.ri.compiler
Class CoreOperationMultiply

    java.lang.Object
      org.apache.commons.jxpath.ri.compiler.Expression
          org.apache.commons.jxpath.ri.compiler.Operation
              org.apache.commons.jxpath.ri.compiler.CoreOperation
                  org.apache.commons.jxpath.ri.compiler.CoreOperationMultiply

    public class CoreOperationMultiply

extends CoreOperation

Implementation of `Expression` for the operation "*".

Version:
  $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
Author:
  Dmitri Plotnikov

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.commons.jxpath.ri.compiler.Expression
`Expression.PointerIterator, Expression.ValueIterator`

Field Summary

Fields inherited from class org.apache.commons.jxpath.ri.compiler.CoreOperation
`ADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCE`

Fields inherited from class org.apache.commons.jxpath.ri.compiler.Operation
`args`

Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression
`NOT_A_NUMBER, ONE, ZERO`

Constructor Summary
`CoreOperationMultiply(Expression arg1, Expression arg2)` Create a new CoreOperationMultiply.

Method Summary
`Object` | `computeValue(EvalContext context)` Evaluates the expression.
`protected int` | `getPrecedence()` Computes the precedence of the operation.
`String` | `getSymbol()` Returns the XPath symbol for this operation, e.g.
`protected boolean` | `isSymmetric()` Returns true if the operation is not sensitive to the order of arguments, e.g.

Methods inherited from class org.apache.commons.jxpath.ri.compiler.CoreOperation
`compute, toString`

Methods inherited from class org.apache.commons.jxpath.ri.compiler.Operation
`computeContextDependent, getArguments`

Methods inherited from class org.apache.commons.jxpath.ri.compiler.Expression
`isContextDependent, iterate, iteratePointers`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CoreOperationMultiply

    public CoreOperationMultiply(Expression arg1,
                                 Expression arg2)

  Create a new CoreOperationMultiply.

  Parameters:
    `arg1` - factor 1
    `arg2` - factor 2

Method Detail

### computeValue

    public 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 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.