csheets.core.formula.lang
Class Exponentiator

java.lang.Object
  extended by csheets.core.formula.lang.Exponentiator
All Implemented Interfaces:
BinaryOperator, Operator, Serializable

public class Exponentiator
extends Object
implements BinaryOperator

An exponential operator for raising a numeric operand to the power of another.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
Exponentiator()
          Creates a new exponential operator.
 
Method Summary
 Value applyTo(Expression leftOperand, Expression rightOperand)
          Applies the operator to the given operands and returns the result.
 String getIdentifier()
          Returns the operator's string identirifer.
 Value.Type getOperandValueType()
          Returns the type of value that the operator's operands can have.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Exponentiator

public Exponentiator()
Creates a new exponential operator.

Method Detail

applyTo

public Value applyTo(Expression leftOperand,
                     Expression rightOperand)
              throws IllegalValueTypeException
Description copied from interface: BinaryOperator
Applies the operator to the given operands and returns the result.

Specified by:
applyTo in interface BinaryOperator
Returns:
the result of the operation
Throws:
IllegalValueTypeException - if the value of an operand is not of the expected type

getIdentifier

public String getIdentifier()
Description copied from interface: Operator
Returns the operator's string identirifer.

Specified by:
getIdentifier in interface Operator
Returns:
a string representation of the operator.

getOperandValueType

public Value.Type getOperandValueType()
Description copied from interface: Operator
Returns the type of value that the operator's operands can have.

Specified by:
getOperandValueType in interface Operator
Returns:
the type of value that the operator's operands can have

toString

public String toString()
Overrides:
toString in class Object