org.jfree.formula.operators
Class MultiplyOperator

java.lang.Object
  extended by org.jfree.formula.operators.AbstractNumericOperator
      extended by org.jfree.formula.operators.MultiplyOperator
All Implemented Interfaces:
java.io.Serializable, InfixOperator

public class MultiplyOperator
extends AbstractNumericOperator

Creation-Date: 31.10.2006, 16:34:11

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jfree.formula.operators.AbstractNumericOperator
ZERO
 
Constructor Summary
MultiplyOperator()
           
 
Method Summary
protected  java.lang.Number evaluate(java.lang.Number number1, java.lang.Number number2)
           
 int getLevel()
           
 boolean isAssociative()
          Defines, whether the operation is associative.
 boolean isLeftOperation()
          Defines the bind-direction of the operator.
 java.lang.String toString()
           
 
Methods inherited from class org.jfree.formula.operators.AbstractNumericOperator
evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiplyOperator

public MultiplyOperator()
Method Detail

evaluate

protected java.lang.Number evaluate(java.lang.Number number1,
                                    java.lang.Number number2)
                             throws EvaluationException
Specified by:
evaluate in class AbstractNumericOperator
Throws:
EvaluationException

getLevel

public int getLevel()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isLeftOperation

public boolean isLeftOperation()
Description copied from interface: InfixOperator
Defines the bind-direction of the operator. That direction defines, in which direction a sequence of equal operators is resolved.

Returns:
true, if the operation is left-binding, false if right-binding

isAssociative

public boolean isAssociative()
Defines, whether the operation is associative. For associative operations, the evaluation order does not matter, if the operation appears more than once in an expression, and therefore we can optimize them a lot better than non-associative operations (ie. merge constant parts and precompute them once).

Returns:
true, if the operation is associative, false otherwise