Class IdentityHashSetMap<K,V>

Type Parameters:
K - The type of map key.
V - The type of map value.
All Implemented Interfaces:
CollectionMap<K,V,Set<V>>, Map<K,Set<V>>

public class IdentityHashSetMap<K,V> extends AbstractDecoratorCollectionMap<K,V,Set<V>>
An decorator map that stores an IdentityHashSet of values for each key, with special methods for retrieving single values.
Author:
Garret Wilson
  • Constructor Details

    • IdentityHashSetMap

      public IdentityHashSetMap(Map<K,Set<V>> map)
      Map constructor.
      Parameters:
      map - The map this map should decorate.
      Throws:
      NullPointerException - if the provided map is null.
  • Method Details

    • createCollection

      public Set<V> createCollection()
      Creates a collection in which to store values. This version returns an IdentityHashSet.
      Returns:
      The collections with the values stored.