edu.ucsb.nmsl.tools
Class BaseStatistic

java.lang.Object
  extended by edu.ucsb.nmsl.tools.BaseStatistic
All Implemented Interfaces:
Statistic
Direct Known Subclasses:
DataSetStatistic, DoubleStatistic, IntegerStatistic, PercentageStatistic

public abstract class BaseStatistic
extends java.lang.Object
implements Statistic

This class is the base class for all the statistic classes. It provides a default implementation of the getName, setName, getValue, setValue and equals methods.

The purpose of the Statistic classes is to facilitate the research associated with the creation of the system and is not needed in the normal operation of AutoCap.

Version:
1.0
See Also:
StatisticsPackage

Field Summary
(package private)  java.lang.String Name
          The name associated with the statistical information.
(package private)  java.lang.Object Value
          The value associated with the statistical information.
 
Constructor Summary
BaseStatistic()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          This method overrides the equals method defined in java.lang.Object.
 java.lang.String getName()
          This method returns the name associated with the statistical information.
 java.lang.Object getValue()
          This method returns the value of the statistical information.
 void setName(java.lang.String n)
          This method sets the name associated with the statistical information.
 void setValue(java.lang.Object o)
          This method sets the value of the statistical information.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.ucsb.nmsl.tools.Statistic
displayString
 

Field Detail

Name

java.lang.String Name
The name associated with the statistical information.


Value

java.lang.Object Value
The value associated with the statistical information.

Constructor Detail

BaseStatistic

public BaseStatistic()
Method Detail

getName

public java.lang.String getName()
This method returns the name associated with the statistical information.

Specified by:
getName in interface Statistic
Returns:
The statistic name as a String.

getValue

public java.lang.Object getValue()
This method returns the value of the statistical information.

Specified by:
getValue in interface Statistic
Returns:
The statistical information as an Object. This instance is usually one of the wrapper classes for primitive types such as Integer or Double.

setName

public void setName(java.lang.String n)
This method sets the name associated with the statistical information.

Specified by:
setName in interface Statistic
Parameters:
n - - The name to be associated with the statistical information.

setValue

public void setValue(java.lang.Object o)
This method sets the value of the statistical information.

Specified by:
setValue in interface Statistic
Parameters:
o - - The statistical information as an Object. This instance is usually one of the wrapper classes for primitive types such as Integer or Double.

equals

public boolean equals(java.lang.Object o)
This method overrides the equals method defined in java.lang.Object. It determines if one instance of a BaseStatistic, or its derived chilrend, is equal to another instance. By definition two BaseStatistic objects are equal only if their name and value are equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - An object this BaseStatistic will be compared to.
Returns:
True if the BaseStatistic objects are equal, false otherwise.