public class StandardMultiMap<K,V,C extends Collection<V>> extends Object implements MultiMap<K,V>
MultiMap| 构造器和说明 |
|---|
StandardMultiMap() |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<K,Collection<V>> |
asMap()
Get java map of the multimap, the returned map is modifiable.
|
void |
clear()
Clear the map and remove all key-value pairs.
|
boolean |
containsKey(Object o)
Whether the map contains the specified key.
|
Collection<Map.Entry<K,V>> |
entries()
Get all key-value pairs in the map.
|
Collection<V> |
get(K k)
Get all values of the specified key, if the key does not exist, return an empty collection.
|
boolean |
isEmpty()
Whether the map is empty.
|
Set<K> |
keySet()
Get all keys in the map.
|
boolean |
put(K k,
V v)
Put the specified key-value pair into the map.
|
void |
putAll(K k,
Iterable<? extends V> iterable)
Put all key-value pairs in the specified map into the map.
|
void |
putAll(MultiMap<K,V> multiMap)
Put all key-value pairs in the specified map into the map.
|
Collection<V> |
removeAll(Object o)
Remove all key-value pairs with the specified key from the map.
|
int |
size()
Get the total number of key-value pairs in the map.
|
Collection<V> |
values()
Get all values in the map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitarrayListMultimap, emptyMultiMap, equals, forEach, hashCode, linkedHashMultimap, linkedListMultimappublic int size()
public boolean isEmpty()
public boolean containsKey(Object o)
containsKey 在接口中 MultiMap<K,V>o - keypublic void putAll(K k, Iterable<? extends V> iterable)
public void putAll(MultiMap<K,V> multiMap)
public Collection<V> removeAll(Object o)
public void clear()
public Collection<V> get(K k)
public Collection<V> values()
public Collection<Map.Entry<K,V>> entries()
Get all key-value pairs in the map.
The returned entries are modifiable, but the modification will not affect the map.
Copyright © 2024. All rights reserved.