to top
public class

MultiMap

extends Object
java.lang.Object
   ↳ com.android.tradefed.util.MultiMap<K, V>
Known Direct Subclasses

Class Overview

A Map that supports multiple values per key.

Summary

Public Constructors
MultiMap()
Public Methods
void clear()
Clears the map.
boolean containsKey(K key)
Checks whether the map contains the specified key.
boolean containsValue(V value)
Checks whether the map contains the specified value.
boolean equals(Object obj)
List<V> get(K key)
Gets the list of values associated with each key.
Map<String, V> getUniqueMap()
Construct a new map, that contains a unique String key for each value.
int hashCode()
boolean isEmpty()
Set<K> keySet()
Check if map is empty.
V put(K key, V value)
Adds the value to the list associated with a key.
void putAll(MultiMap<K, ? extends V> m)
Adds all entries in given MultiMap to this MultiMap.
void putAll(Map<? extends K, ? extends V> m)
Adds all entries in given Map to this MultiMap.
List<V> remove(K key)
Removes all values associated with the specified key.
int size()
Returns the number of keys in the map
List<V> values()
Returns list of all values.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MultiMap ()

Public Methods

public void clear ()

Clears the map.

public boolean containsKey (K key)

Checks whether the map contains the specified key.

public boolean containsValue (V value)

Checks whether the map contains the specified value.

public boolean equals (Object obj)

public List<V> get (K key)

Gets the list of values associated with each key.

public Map<String, V> getUniqueMap ()

Construct a new map, that contains a unique String key for each value. Current algorithm will construct unique key by appending a unique position number to key's toString() value

Returns

public int hashCode ()

public boolean isEmpty ()

public Set<K> keySet ()

Check if map is empty.

public V put (K key, V value)

Adds the value to the list associated with a key.

public void putAll (MultiMap<K, ? extends V> m)

Adds all entries in given MultiMap to this MultiMap.

public void putAll (Map<? extends K, ? extends V> m)

Adds all entries in given Map to this MultiMap.

public List<V> remove (K key)

Removes all values associated with the specified key.

public int size ()

Returns the number of keys in the map

public List<V> values ()

Returns list of all values.