|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaige.Statistic
public class Statistic
A Statistic is a simple structure used to hold numerical data. It contains the statistics name, a unit if necessary, and an array of values. The array of values is assumed to have the same length as the number of players it represents. This structure can be reused when appropriate.
Copyright: Copyright (c) Jaige 2007
Constructor Summary | |
---|---|
Statistic(java.lang.String name)
Creates a new Statistic with the specified name. |
|
Statistic(java.lang.String name,
java.lang.String unit,
java.lang.Number[] values)
Creates a new Statistic with the specified name, unit, and values. |
Method Summary | |
---|---|
int |
compareTo(Statistic s)
Compares the name of this statistic to the name of the supplied statistic |
boolean |
equals(java.lang.Object s)
|
java.lang.String |
getName()
Returns the name of this statistic. |
java.lang.String |
getUnit()
Gets the unit that this statistic is in |
java.lang.Number[] |
getValues()
Gets the values associated with this statistic |
void |
setName(java.lang.String name)
Sets the name of this statistic |
void |
setUnit(java.lang.String unit)
Sets the unit that this statistic is in |
void |
setValues(java.lang.Number[] values)
Sets the values associated with this statistic |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Statistic(java.lang.String name, java.lang.String unit, java.lang.Number[] values)
name
- String Name of this statisticunit
- String The unit of this statistic. ie: ms, sec, cm, etc.values
- Number[] The values associated with this statistic.public Statistic(java.lang.String name)
name
- String Name of this statisticMethod Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- String name of this statisticpublic java.lang.String getUnit()
public void setUnit(java.lang.String unit)
unit
- String the unit that this statistic is inpublic java.lang.Number[] getValues()
public void setValues(java.lang.Number[] values)
values
- Number[] the values associated with this statisticpublic int compareTo(Statistic s)
compareTo
in interface java.lang.Comparable<Statistic>
s
- Statistic statstic to compare to.
public boolean equals(java.lang.Object s)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |