Package net.i2p.util

Class ObjectCounter<K>

    • 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. 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