Package com.globalmentor.collections
Class CopyOnWriteArrayListConcurrentHashMap<K,V>
- java.lang.Object
-
- com.globalmentor.collections.MapDecorator<K,C>
-
- com.globalmentor.collections.AbstractDecoratorCollectionMap<K,V,java.util.List<V>>
-
- com.globalmentor.collections.CopyOnWriteArrayListConcurrentHashMap<K,V>
-
- All Implemented Interfaces:
CollectionMap<K,V,java.util.List<V>>
,java.util.Map<K,java.util.List<V>>
public class CopyOnWriteArrayListConcurrentHashMap<K,V> extends AbstractDecoratorCollectionMap<K,V,java.util.List<V>>
An implementation of aConcurrentHashMap
that stores aCopyOnWriteArrayList
of values for each key, with special methods for retrieving single values.- Author:
- Garret Wilson
-
-
Field Summary
-
Fields inherited from class com.globalmentor.collections.MapDecorator
map
-
-
Constructor Summary
Constructors Constructor Description CopyOnWriteArrayListConcurrentHashMap()
Default constructor that decorates aConcurrentHashMap
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<V>
createCollection()
Creates a collection in which to store values.-
Methods inherited from class com.globalmentor.collections.AbstractDecoratorCollectionMap
addItem, getCollection, getItem, getItemCount, getItems, hasItems, removeItem
-
Methods inherited from class com.globalmentor.collections.MapDecorator
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
createCollection
public java.util.List<V> createCollection()
Creates a collection in which to store values. This version returns anArrayList
.- Returns:
- The collections with the values stored.
-
-