Google Core Libraries for Java 999.0.0-HEAD-jre-SNAPSHOT API)
- All Implemented Interfaces:
Multimap<K,V>, SetMultimap<K, V>, Serializable
-
Method Summary
asMap()Returns a view of this multimap as a
Mapfrom each distinct key to the nonempty collection of that key's associated values.voidclear()Removes all key-value pairs from the multimap, leaving it empty.
booleanReturns
trueif this multimap contains at least one key-value pair with the keykeyand the valuevalue.booleanReturns
trueif this multimap contains at least one key-value pair with the keykey.booleanReturns
trueif this multimap contains at least one key-value pair with the valuevalue.create()Creates a new, empty
HashMultimapwith the default initial capacities.create(int expectedKeys, int expectedValuesPerKey) Constructs an empty
HashMultimapwith enough capacity to hold the specified numbers of keys and values without rehashing.create(Multimap<? extends K, ? extends V> multimap) Constructs a
HashMultimapwith the same mappings as the specified multimap.entries()Returns a view collection of all key-value pairs contained in this multimap, as
Map.Entryinstances.booleanCompares the specified object to this multimap for equality.
voidPerforms the given action for all key-value pairs contained in this multimap.
Returns a view collection of the values associated with
keyin this multimap, if any.inthashCode()Returns the hash code for this multimap.
booleanisEmpty()Returns
trueif this multimap contains no key-value pairs.keys()Returns a view collection containing the key from each key-value pair in this multimap, without collapsing duplicates.
keySet()Returns a view collection of all distinct keys contained in this multimap.
booleanStores a key-value pair in the multimap.
booleanputAll(Multimap<? extends K, ? extends V> multimap) Stores all key-value pairs of
multimapin this multimap, in the order returned bymultimap.entries().booleanputAll(K key, Iterable<? extends V> values) Stores a key-value pair in this multimap for each of
values, all using the same key,key.booleanRemoves a single key-value pair with the key
keyand the valuevaluefrom this multimap, if such exists.Removes all values associated with the key
key.Stores a collection of values with the same key, replacing any existing values for that key.
intsize()Returns the number of key-value pairs in this multimap.
toString()Returns a string representation of the multimap, generated by calling
toStringon the map returned byMultimap.asMap().values()Returns a view collection containing the value from each key-value pair contained in this multimap, without collapsing duplicates (so
values().size() == size()).Methods inherited from interface Multimap
clear, containsEntry, containsKey, containsValue, forEach, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, size, values
-
Method Details
-
create
-
create
-
create
-
get
-
entries
-
removeAll
-
replaceValues
-
asMap
-
put
-
equals
-
size
-
containsKey
-
clear
-
values
-
forEach
-
isEmpty
-
containsValue
-
containsEntry
-
remove
-
putAll
-
putAll
-
keySet
-
keys
-
hashCode
-
toString
-