Class LinkedListMultimap<K,V>

java.lang.Object
java.util.AbstractMap<K,LinkedList<V>>
java.util.HashMap<K,LinkedList<V>>
icyllis.arc3d.engine.LinkedListMultimap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,LinkedList<V>>

@NotThreadSafe public class LinkedListMultimap<K,V> extends HashMap<K,LinkedList<V>>
Implementation of Multimap that uses an LinkedList to store the values for a given key. A HashMap associates each key with an LinkedList of values. Empty LinkedList values will be automatically removed.
See Also:
  • Constructor Details

    • LinkedListMultimap

      public LinkedListMultimap()
    • LinkedListMultimap

      public LinkedListMultimap(@Nonnull Map<? extends K,? extends LinkedList<V>> other)
  • Method Details

    • addFirstEntry

      public void addFirstEntry(@Nonnull K k, @Nonnull V v)
    • addLastEntry

      public void addLastEntry(@Nonnull K k, @Nonnull V v)
    • pollFirstEntry

      @Nullable public V pollFirstEntry(@Nonnull K k)
    • pollLastEntry

      @Nullable public V pollLastEntry(@Nonnull K k)
    • peekFirstEntry

      @Nullable public V peekFirstEntry(@Nonnull K k)
    • peekLastEntry

      @Nullable public V peekLastEntry(@Nonnull K k)
    • removeFirstEntry

      public void removeFirstEntry(@Nonnull K k, @Nonnull V v)
    • removeLastEntry

      public void removeLastEntry(@Nonnull K k, @Nonnull V v)