Package org.snpeff.collections
Class MultivalueHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,java.util.LinkedList<V>>
-
- org.snpeff.collections.MultivalueHashMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<K,java.util.LinkedList<V>>
public class MultivalueHashMap<K,V> extends java.util.HashMap<K,java.util.LinkedList<V>>
A Hash that can hold multiple values for each key- Author:
- pcingola
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultivalueHashMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(K key, java.util.Collection<V> values)
Add multiple valuesvoid
add(K key, V value)
Add a single valuejava.util.List<V>
getOrCreate(K key)
Get a list of values (or create it if not available)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-