Package com.google.common.collect
Class Multimaps.AsMap<K,V>
java.lang.Object
java.util.AbstractMap<K,Collection<V>>
com.google.common.collect.Maps.ViewCachingAbstractMap<K,Collection<V>>
com.google.common.collect.Multimaps.AsMap<K,V>
- All Implemented Interfaces:
Map<K,Collection<V>>
- Enclosing class:
Multimaps
A skeleton implementation of
Multimap.asMap().-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) protected Set<Map.Entry<K, Collection<V>>> Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet().booleanisEmpty()keySet()(package private) voidremoveValuesForKey(Object key) intsize()Methods inherited from class com.google.common.collect.Maps.ViewCachingAbstractMap
createKeySet, createValues, entrySet, valuesMethods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, put, putAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
multimap
-
-
Constructor Details
-
AsMap
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceMap<K,V> - Overrides:
sizein classAbstractMap<K,Collection<V>>
-
createEntrySet
Description copied from class:Maps.ViewCachingAbstractMapCreates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet(). This method is invoked at most once on a given map, at the time whenentrySetis first called.- Specified by:
createEntrySetin classMaps.ViewCachingAbstractMap<K,Collection<V>>
-
removeValuesForKey
-
get
- Specified by:
getin interfaceMap<K,V> - Overrides:
getin classAbstractMap<K,Collection<V>>
-
remove
- Specified by:
removein interfaceMap<K,V> - Overrides:
removein classAbstractMap<K,Collection<V>>
-
keySet
- Specified by:
keySetin interfaceMap<K,V> - Overrides:
keySetin classMaps.ViewCachingAbstractMap<K,Collection<V>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<K,V> - Overrides:
isEmptyin classAbstractMap<K,Collection<V>>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,Collection<V>>
-
clear
public void clear()- Specified by:
clearin interfaceMap<K,V> - Overrides:
clearin classAbstractMap<K,Collection<V>>
-