Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.analysis
Class DataSourceUtilities

    java.lang.Object
      uchicago.src.sim.analysis.DataSourceUtilities

    public class DataSourceUtilities

extends java.lang.Object

Utility methods for return data. Used by those classes that realize the DataSource interface.

Version:
  $Revision: 1.5 $ $Date: 2004/11/03 19:51:00 $
Author:
  Nick Collier

Constructor Summary
`DataSourceUtilities()`

Method Summary
`static java.lang.Object` | `getAverage(java.util.ArrayList list, java.lang.reflect.Method m)` Calls the specified method on every object in the specified list.
`static java.lang.Object` | `getObject(java.lang.Object o, java.lang.reflect.Method m)` Calls the specified method on the specified object, returning the result as an Object

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DataSourceUtilities

    public DataSourceUtilities()

Method Detail

### getObject

    public static java.lang.Object getObject(java.lang.Object o,
                                             java.lang.reflect.Method m)

  Calls the specified method on the specified object, returning the result as an Object

### getAverage

    public static java.lang.Object getAverage(java.util.ArrayList list,
                                              java.lang.reflect.Method m)

  Calls the specified method on every object in the specified list. The resulting values are averaged and this average is returned as a Double. Average is computed as the (sum of the all the elements in the list) / (the size of the list).

  Returns:
    the average as a Double (to be cast by caller).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD