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 TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) protected Set
<Map.Entry<K, Collection<V>>> Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet()
.boolean
isEmpty()
keySet()
(package private) void
removeValuesForKey
(Object key) int
size()
Methods inherited from class com.google.common.collect.Maps.ViewCachingAbstractMap
createKeySet, createValues, entrySet, values
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, put, putAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
size
in interfaceMap<K,
V> - Overrides:
size
in classAbstractMap<K,
Collection<V>>
-
createEntrySet
Description copied from class:Maps.ViewCachingAbstractMap
Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet()
. This method is invoked at most once on a given map, at the time whenentrySet
is first called.- Specified by:
createEntrySet
in classMaps.ViewCachingAbstractMap<K,
Collection<V>>
-
removeValuesForKey
-
get
- Specified by:
get
in interfaceMap<K,
V> - Overrides:
get
in classAbstractMap<K,
Collection<V>>
-
remove
- Specified by:
remove
in interfaceMap<K,
V> - Overrides:
remove
in classAbstractMap<K,
Collection<V>>
-
keySet
- Specified by:
keySet
in interfaceMap<K,
V> - Overrides:
keySet
in classMaps.ViewCachingAbstractMap<K,
Collection<V>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMap<K,
V> - Overrides:
isEmpty
in classAbstractMap<K,
Collection<V>>
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
Collection<V>>
-
clear
public void clear()- Specified by:
clear
in interfaceMap<K,
V> - Overrides:
clear
in classAbstractMap<K,
Collection<V>>
-