# Class ListMap<K,V>

java.lang.Object
java.util.AbstractMap<K,List<V>>
java.util.HashMap<K,List<V>>
htsjdk.samtools.util.ListMap<K,V>

All Implemented Interfaces:
  `Serializable, Cloneable, Map<K,List<V>>`

public class ListMap<K,V> extends HashMap<K,List<V>>
A Map class that holds a list of entries under each key instead of a single entry, and provides utility methods for adding an entry under a key.

See Also:
  - Serialized Form

## Nested Class Summary

### Nested classes/interfaces inherited from class AbstractMap

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

### Nested classes/interfaces inherited from interface Map

`Map.Entry<K,V>`

## Constructor Summary

Constructors
Constructor
Description
`ListMap()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(K key, V value)`
Adds a single value to the list stored under a key.

### Methods inherited from class 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 AbstractMap

`equals, hashCode, toString`

### Methods inherited from class Object

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

### Methods inherited from interface Map

`equals, hashCode`

## Constructor Details

### ListMap

public ListMap()

## Method Details

### add

public void add(K key, V value)
Adds a single value to the list stored under a key.