uchicago.src.sim.analysis
Class AverageSequence

java.lang.Object
  extended by uchicago.src.sim.analysis.AverageSequence
All Implemented Interfaces:
Sequence

public class AverageSequence
extends java.lang.Object
implements Sequence

Computes the minimum of a sequence of values, based on a list of objects and a method to call on them. This class works much the same as the AverageDataSource class.

Version:
$Revision: 1.6 $ $Date: 2004/11/03 19:51:00 $
Author:
Nick Collier
See Also:
MaxSequence, MinSequence

Constructor Summary
AverageSequence(java.util.ArrayList list, java.lang.String methodName)
          Constructs this AverageSequence using the specified list and method name.
 
Method Summary
 double getSValue()
          Compute and return the average.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageSequence

public AverageSequence(java.util.ArrayList list,
                       java.lang.String methodName)
Constructs this AverageSequence using the specified list and method name. Each object in the list should respond to the method named by method name. This method must return some subclass of Number.

Parameters:
list - the list of objects on which to call the method
methodName - the name of the method to call. This method must return some subclass of java.Number.
See Also:
Number
Method Detail

getSValue

public double getSValue()
Compute and return the average.

Specified by:
getSValue in interface Sequence
Returns:
the value to be plotted.