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

    Constructors
    Constructor and Description
    `ObjectCounter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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