Class ArrayListMap<K,V>

Type Parameters:
K - The type of map key.
V - The type of map value.
All Implemented Interfaces:
CollectionMap<K,V,List<V>>, Map<K,List<V>>
Direct Known Subclasses:
ArrayListHashMap

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

    • ArrayListMap

      public ArrayListMap(Map<K,List<V>> map)
      Map constructor.
      Parameters:
      map - The map this map should decorate.
      Throws:
      NullPointerException - if the provided map is null.
  • 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.