Class ArrayListValuedLinkedHashMap<K,​V>

  • Type Parameters:
    K - the type of the keys in this map
    V - the type of the values in this map
    All Implemented Interfaces:
    java.io.Serializable, ListValuedMap<K,​V>, MultiValuedMap<K,​V>

    public class ArrayListValuedLinkedHashMap<K,​V>
    extends AbstractListValuedMap<K,​V>
    implements java.io.Serializable
    Implements a ListValuedMap, using a LinkedHashMap to provide data storage and ArrayLists as value collections. This is the standard implementation of a ListValuedMap.

    Note that ArrayListValuedLinkedHashMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. This class may throw exceptions when accessed by concurrent threads without synchronization.

    Since:
    4.5.0-M3
    See Also:
    Serialized Form
    • Constructor Detail

      • ArrayListValuedLinkedHashMap

        public ArrayListValuedLinkedHashMap()
        Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the default initial list capacity (3).
      • ArrayListValuedLinkedHashMap

        public ArrayListValuedLinkedHashMap​(int initialListCapacity)
        Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the specified initial list capacity.
        Parameters:
        initialListCapacity - the initial capacity used for value collections
      • ArrayListValuedLinkedHashMap

        public ArrayListValuedLinkedHashMap​(int initialMapCapacity,
                                            int initialListCapacity)
        Creates an empty ArrayListValuedHashMap with the specified initial map and list capacities.
        Parameters:
        initialMapCapacity - the initial hashmap capacity
        initialListCapacity - the initial capacity used for value collections
      • ArrayListValuedLinkedHashMap

        public ArrayListValuedLinkedHashMap​(java.util.Map<? extends K,​? extends V> map)
        Creates an ArrayListValuedHashMap copying all the mappings of the given map.
        Parameters:
        map - a Map to copy into this map
      • ArrayListValuedLinkedHashMap

        public ArrayListValuedLinkedHashMap​(MultiValuedMap<? extends K,​? extends V> map)
        Creates an ArrayListValuedHashMap copying all the mappings of the given map.
        Parameters:
        map - a MultiValuedMap to copy into this map