|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucsb.nmsl.tools.StatisticsPackage
public class StatisticsPackage
The responsibility of the StatisticsPackage is to keep the information collected during a specific running of AutoCap and allow access and print out that information as needed during research. The information collected by this class is for the purposes of research only and are not necessary for the normal operation of AutoCap.
The Statistics class works by keeping a map of Statistic instances. This relationship names each statistic and allows for access to the information based on the name give when a Statistics instance is storeed. Also, the name is used when the StatisticsPackage is converted to a string. Each statistic's value is printed out along with the name used to store it in the map.
Field Summary | |
---|---|
protected java.util.HashMap |
Statistics
The container that maps each Statistics object with its name. |
Constructor Summary | |
---|---|
StatisticsPackage()
This default constructor creates a default instance of the class. |
|
StatisticsPackage(java.util.Collection stats)
This contructor creates an instance of the StatisticsPackage and fills in the map with each element of the Container instance passed to the constructor. |
Method Summary | |
---|---|
void |
add(BaseStatistic o)
This function adds a BaseStatistic object to the map and expands the information stored in the package. |
BaseStatistic |
getStatistic(java.lang.String name)
This accessor method allows the retrieval of individual BaseStatistics instances from the package. |
java.util.Iterator |
iterator()
This method allows the user to iterator through each BaseStatistic instance in the package. |
java.util.ListIterator |
listIterator(int idx)
This method allows the user to iterator through each BaseStatistic instance in the package. |
void |
remove(BaseStatistic o)
This function removes a BaseStatistic object from the map and contracts the information stored in the package. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap Statistics
Constructor Detail |
---|
public StatisticsPackage()
public StatisticsPackage(java.util.Collection stats) throws java.lang.ClassCastException
stats
- - A collection of BaseStatistics objects that make up the
StatisticsPackage
java.lang.ClassCastException
Method Detail |
---|
public void add(BaseStatistic o)
o
- - The BaseStatistic instance that is being added to the package.public void remove(BaseStatistic o)
o
- - The BaseStatistic instance that is being removed from the
package.public BaseStatistic getStatistic(java.lang.String name)
name
- - The name of the BaseStatistic stored in the package.
public java.util.Iterator iterator()
public java.util.ListIterator listIterator(int idx)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |