|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hawlitzek.util.text.CountedEntry
This class represents counted and named entries in a collection. It provides base statistic functionality.
Field Summary | |
protected java.lang.String |
id
|
protected int |
nrOccurencesAbsolute
|
protected double |
nrOccurencesRelative
|
Constructor Summary | |
CountedEntry(java.lang.String id)
Constructor |
Method Summary | |
void |
addAnzVorkommen()
Adds one occurence to nrOccurencesAbsolute |
void |
calcNrOccurencesRelative(int totalOccurences)
calculates the relative number of occurences (percentage) |
java.lang.String |
getId()
Gets the id |
int |
getNrOccurencesAbsolute()
Gets the absolute number of occurences |
double |
getNrOccurencesRelative()
Gets the relative number of occurences (percentage) |
java.lang.String |
getNrOccurencesRelativeAsString()
Gets the relative number of occurences (percentage) as String |
void |
setId(java.lang.String id)
Sets the id |
void |
setNrOccurencesAbsolute(int nrOccurencesAbsolute)
Sets the absolute number of occurences |
void |
setNrOccurencesRelative(double nrOccurencesRelative)
sets the relative number of occurences (percentage) |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String id
protected int nrOccurencesAbsolute
protected double nrOccurencesRelative
Constructor Detail |
public CountedEntry(java.lang.String id)
Method Detail |
public double getNrOccurencesRelative()
public java.lang.String getNrOccurencesRelativeAsString()
public void setNrOccurencesRelative(double nrOccurencesRelative)
nrOccurencesRelative
- The nrOccurencesRelative to setpublic void calcNrOccurencesRelative(int totalOccurences)
totalOccurences
- intpublic int getNrOccurencesAbsolute()
public void setNrOccurencesAbsolute(int nrOccurencesAbsolute)
nrOccurencesAbsolute
- The nrOccurencesAbsolute to setpublic void addAnzVorkommen()
public java.lang.String getId()
public void setId(java.lang.String id)
id
- The id to setpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |