|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.j5goodies.Counter<T>
T
- - a comparable type of thing to be counted.public class Counter<T extends Comparable<T>>
A class that counts references to a particular type, T.
Constructor Summary | |
---|---|
Counter()
|
Method Summary | |
---|---|
int |
get(T t)
Get the number of times the instance, t, was counted. |
List<Tally<T>> |
getAll(CounterOrder order)
Get a list of tallies or counts of each item tracked. |
int |
getTotal()
Get the total number of instances counted. |
void |
increment(T t)
Increment the number of instances of 't' by one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Counter()
Method Detail |
---|
public void increment(T t)
Increment the number of instances of 't' by one.
t
- - the instance being counted.public List<Tally<T>> getAll(CounterOrder order)
Get a list of tallies or counts of each item tracked.
order
- - either ascending or descending (null is equivalent to ascending).
public int get(T t)
Get the number of times the instance, t, was counted.
t
- - the instance.
public int getTotal()
Get the total number of instances counted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |