Package net.i2p.util
Class ObjectCounter<K>
- java.lang.Object
-
- net.i2p.util.ObjectCounter<K>
-
- All Implemented Interfaces:
Serializable
public class ObjectCounter<K> extends Object implements Serializable
Count things.- Author:
- zzz, welterde
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectCounter()
-
-
-
Method Detail
-
increment
public int increment(K h)
Add one.- Returns:
- count after increment
-
count
public int count(K h)
- Returns:
- current count
-
clear
public void clear()
Start over. Reset the count for all keys to zero.- Since:
- 0.7.11
-
clear
public void clear(K h)
Reset the count for this key to zero- Since:
- 0.9.36
-
-