Class CopyOnWriteArrayListConcurrentHashMap<K,V>

java.lang.Object
com.globalmentor.collections.MapDecorator<K,C>
com.globalmentor.collections.AbstractDecoratorCollectionMap<K,V,List<V>>
com.globalmentor.collections.CopyOnWriteArrayListConcurrentHashMap<K,V>
All Implemented Interfaces:
CollectionMap<K,V,List<V>>, Map<K,List<V>>

public class CopyOnWriteArrayListConcurrentHashMap<K,V> extends AbstractDecoratorCollectionMap<K,V,List<V>>
An implementation of a ConcurrentHashMap that stores a CopyOnWriteArrayList of values for each key, with special methods for retrieving single values.
Author:
Garret Wilson
  • Constructor Details

    • CopyOnWriteArrayListConcurrentHashMap

      public CopyOnWriteArrayListConcurrentHashMap()
      Default constructor that decorates a ConcurrentHashMap.
  • Method Details

    • createCollection

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