JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Power

java.lang.Object
  |
  +--com.klg.jclass.util.formulae.Operation
        |
        +--com.klg.jclass.util.formulae.Power
All Implemented Interfaces:
Cloneable, Expression

public class Power
extends Operation

This is a concrete implementation for the exponentiation "^" operation. Exponentiation is normally a binary operation, *???but we also permit the use of one list as the exponents of another???*.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Power()
          Create a exponentiation operation
Power(com.klg.jclass.util.formulae.Expression base, com.klg.jclass.util.formulae.Expression exp)
          Create an operation to raise a given of operand to the power of another
Power(com.klg.jclass.util.formulae.Expression base, Number exp)
          Create an operation to raise an Expression to the power of a Number
Power(Number base, com.klg.jclass.util.formulae.Expression exp)
          Create an operation to raise a Number to the power of an Expression
Power(Number base, Number exp)
          Create an operation to raise a Number to the power of another
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the result of raising the first operand to the power of the second
 
Methods inherited from class com.klg.jclass.util.formulae.Operation
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Power

public Power()
Create a exponentiation operation


Power

public Power(com.klg.jclass.util.formulae.Expression base,
             com.klg.jclass.util.formulae.Expression exp)
Create an operation to raise a given of operand to the power of another


Power

public Power(com.klg.jclass.util.formulae.Expression base,
             Number exp)
Create an operation to raise an Expression to the power of a Number


Power

public Power(Number base,
             com.klg.jclass.util.formulae.Expression exp)
Create an operation to raise a Number to the power of an Expression


Power

public Power(Number base,
             Number exp)
Create an operation to raise a Number to the power of another

Method Detail

evaluate

public com.klg.jclass.util.formulae.Result evaluate()
Return the result of raising the first operand to the power of the second

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The result of first^second

Copyright © 2004 Quest Software Inc..
All rights reserved.