Class ObjectCounter<K>

java.lang.Object
games.stendhal.server.util.ObjectCounter<K>
Type Parameters:
K - Type of objects to count

public class ObjectCounter<K> extends Object
Counts objects.
Author:
hendrik
  • Constructor Details

    • ObjectCounter

      public ObjectCounter()
  • Method Details

    • clear

      public void clear()
      Clears the counter.
    • getMap

      public Map<K,​Integer> getMap()
      Gets the counter map.
      Returns:
      Map
    • add

      public void add(K o)
      Adds one to the appropriate entry.
      Parameters:
      o - object