JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Average

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

public class Average
extends Operation

This is a concrete implementation for the average operation. Average (arithmetic mean) is defined as the total value of all elements, divided by the number of elements.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Average(com.klg.jclass.util.formulae.Expression operand)
          Average across the given operand (usually a list of expressions)
Average(com.klg.jclass.util.formulae.Expression left, com.klg.jclass.util.formulae.Expression right)
          Average a pair of Expressions
Average(com.klg.jclass.util.formulae.Expression left, Number right)
          Average an Expression and a Number
Average(Number left, com.klg.jclass.util.formulae.Expression right)
          Average a Number and an Expression
Average(Number left, Number right)
          Average two Numbers
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the result of averaging 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

Average

public Average(com.klg.jclass.util.formulae.Expression operand)
Average across the given operand (usually a list of expressions)


Average

public Average(com.klg.jclass.util.formulae.Expression left,
               com.klg.jclass.util.formulae.Expression right)
Average a pair of Expressions


Average

public Average(com.klg.jclass.util.formulae.Expression left,
               Number right)
Average an Expression and a Number


Average

public Average(Number left,
               com.klg.jclass.util.formulae.Expression right)
Average a Number and an Expression


Average

public Average(Number left,
               Number right)
Average two Numbers

Method Detail

evaluate

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

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The average value of all the operands

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