Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.util
Class ObjectCounter<K>

    java.lang.Object
      net.i2p.util.ObjectCounter<K>

    public class ObjectCounter<K>

extends Object

Count things.

Author:
  zzz, welterde

Constructor Summary
`ObjectCounter()`

Method Summary
`void` | `clear()` start over
`int` | `count(K h)`
`int` | `increment(K h)` Add one.
`Set<K>` | `objects()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ObjectCounter

    public ObjectCounter()

Method Detail

### increment

    public int increment(K h)

  Add one.

  Returns:
    count after increment

### count

    public int count(K h)

  Returns:
    current count

### objects

    public Set<K> objects()

  Returns:
    set of objects with counts > 0

### clear

    public void clear()

  start over

  Since:
    0.7.11

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD