Package icyllis.arc3d.engine

# 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:
  - `HashMap`
  - `LinkedList`
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.util.AbstractMap

  `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K,V>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LinkedListMultimap()`
  `LinkedListMultimap(Map<? extends K,? extends LinkedList<V>> other)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFirstEntry(K k, V v)`
  `void`
  `addLastEntry(K k, V v)`
  `V`
  `peekFirstEntry(K k)`
  `V`
  `peekLastEntry(K k)`
  `V`
  `pollFirstEntry(K k)`
  `V`
  `pollLastEntry(K k)`
  `void`
  `removeFirstEntry(K k, V v)`
  `void`
  `removeLastEntry(K k, V v)`

  ### Methods inherited from class java.util.HashMap

  `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

  ### Methods inherited from class java.util.AbstractMap

  `equals, hashCode, toString`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface java.util.Map

  `equals, hashCode`

- ## 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)