org.pentaho.reporting.libraries.formula.operators
Class PowerOperator

java.lang.Object
  extended by org.pentaho.reporting.libraries.formula.operators.AbstractNumericOperator
      extended by org.pentaho.reporting.libraries.formula.operators.PowerOperator
All Implemented Interfaces:
Serializable, InfixOperator

public class PowerOperator
extends AbstractNumericOperator

This has to be implemented manually if we want to support arbitary precision. Damn, do I have to implement the logarithm computation as well? For now: Ignore that and use doubles!

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
PowerOperator()
           
 
Method Summary
 int getLevel()
           
 boolean isAssociative()
          Defines, whether the operation is associative.
 boolean isLeftOperation()
          Defines the bind-direction of the operator.
 String toString()
           
 
Methods inherited from class org.pentaho.reporting.libraries.formula.operators.AbstractNumericOperator
evaluate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PowerOperator

public PowerOperator()
Method Detail

getLevel

public int getLevel()

toString

public String toString()
Overrides:
toString in class 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