Class ReferenceCountMap<Key>

java.lang.Object
com.telenav.kivakit.collections.map.ReferenceCountMap<Key>

public class ReferenceCountMap<Key> extends Object
A non-thread-safe map of reference counts.
Author:
jonathanl (shibo)
  • Constructor Details

    • ReferenceCountMap

      public ReferenceCountMap()
  • Method Details

    • count

      public Count count(Key object)
      Returns:
      The reference count for the given object
    • count

      public void count(Key object, Count count)
      Sets the count of the given object
    • dereference

      public void dereference(Key object)
      Decreases the reference count of the given object
    • isReferenced

      public boolean isReferenced(Key object)
      Returns:
      True if the given object is referenced
    • reference

      public void reference(Key key)
      Increases the reference count of the given object