JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Divide

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

public class Divide
extends Operation

This is a concrete implementation for the division "/" operation. Division is normally the ratio between a pair of elements, but we also permit a unary form (returns 1 / x) *???and division of two lists???*.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Divide(com.klg.jclass.util.formulae.Expression left, com.klg.jclass.util.formulae.Expression right)
          Create an operation to divide two Expressions
Divide(com.klg.jclass.util.formulae.Expression left, Number right)
          Create an operation to divide an Expression by a Number
Divide(Number left, com.klg.jclass.util.formulae.Expression right)
          Create an operation to divide a Number by an Expression
Divide(Number left, Number right)
          Create an operation to divide two Numbers
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the result of dividing the operands
 
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

Divide

public Divide(com.klg.jclass.util.formulae.Expression left,
              com.klg.jclass.util.formulae.Expression right)
Create an operation to divide two Expressions


Divide

public Divide(com.klg.jclass.util.formulae.Expression left,
              Number right)
Create an operation to divide an Expression by a Number


Divide

public Divide(Number left,
              com.klg.jclass.util.formulae.Expression right)
Create an operation to divide a Number by an Expression


Divide

public Divide(Number left,
              Number right)
Create an operation to divide two Numbers

Method Detail

evaluate

public com.klg.jclass.util.formulae.Result evaluate()
Return the result of dividing the operands

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The result of the first operand divided by the second

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