edu.ucsb.nmsl.tools
Class PercentageStatistic
java.lang.Object
edu.ucsb.nmsl.tools.BaseStatistic
edu.ucsb.nmsl.tools.PercentageStatistic
- All Implemented Interfaces:
- Statistic
public class PercentageStatistic
- extends BaseStatistic
This class represents a statistic that represents percentage information.
The purpose of this class is to facilitate the research associated with the
creation of the system and is not needed in the normal operation of
AutoCap. This class was created to display a percentage with the "%" which
does not occur with the DoubleStatistic class. Only the displayString method
is overloaded withing the definition.
- Version:
- 1.0
- See Also:
StatisticsPackage
Constructor Summary |
PercentageStatistic(java.lang.String n,
double i)
This contructor builds a PercentageStatistic instance with the name
specified by "n" and with the value, as a percentage, specified by i. |
PercentageStatistic(java.lang.String n,
java.lang.Double i)
This contructor builds a PercentageStatistic instance with the name
specified by "n" and with the value, as a percentage, specified by i. |
Method Summary |
java.lang.String |
displayString()
This method returns a string that can be used to neatly show the
statistical information associated with this particular instance. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PercentageStatistic
public PercentageStatistic(java.lang.String n,
java.lang.Double i)
- This contructor builds a PercentageStatistic instance with the name
specified by "n" and with the value, as a percentage, specified by i.
- Parameters:
n
- The name of the PercentageStatisic.i
- The percentage value of the statistic.
PercentageStatistic
public PercentageStatistic(java.lang.String n,
double i)
- This contructor builds a PercentageStatistic instance with the name
specified by "n" and with the value, as a percentage, specified by i.
- Parameters:
n
- The name of the PercentageStatisic.i
- The percentage value of the statistic.
displayString
public java.lang.String displayString()
- This method returns a string that can be used to neatly show the
statistical information associated with this particular instance. The
created displays the number as a percentage. That is, it multiplies its
value by 100 and appends it with the "%" character.
- Returns:
- A string representing the statistical information. This string
usually takes the form of <Name> = <100.0 * Double>%