Package com.google.common.collect
Class AbstractMapBasedMultimap.AsMap
java.lang.Object
java.util.AbstractMap<K,Collection<V>>
com.google.common.collect.Maps.ViewCachingAbstractMap<K,Collection<V>>
com.google.common.collect.AbstractMapBasedMultimap.AsMap
- All Implemented Interfaces:
Map<K,
Collection<V>>
- Direct Known Subclasses:
AbstractMapBasedMultimap.SortedAsMap
- Enclosing class:
AbstractMapBasedMultimap<K,
V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
(package private) class
Iterator across all keys and value collections.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Map
<K, Collection<V>> Usually the same as map, but smaller for the headMap(), tailMap(), or subMap() of a SortedAsMap. -
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
int
hashCode()
keySet()
int
size()
toString()
(package private) Map.Entry
<K, Collection<V>> wrapEntry
(Map.Entry<K, Collection<V>> entry) Methods inherited from class com.google.common.collect.Maps.ViewCachingAbstractMap
createKeySet, createValues, entrySet, values
Methods inherited from class java.util.AbstractMap
clone, containsValue, isEmpty, put, putAll
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
-
submap
Usually the same as map, but smaller for the headMap(), tailMap(), or subMap() of a SortedAsMap.
-
-
Constructor Details
-
AsMap
AsMap(Map<K, Collection<V>> submap)
-
-
Method Details
-
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>>
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
Collection<V>> - Overrides:
containsKey
in classAbstractMap<K,
Collection<V>>
-
get
- Specified by:
get
in interfaceMap<K,
Collection<V>> - Overrides:
get
in classAbstractMap<K,
Collection<V>>
-
keySet
- Specified by:
keySet
in interfaceMap<K,
Collection<V>> - Overrides:
keySet
in classMaps.ViewCachingAbstractMap<K,
Collection<V>>
-
size
public int size()- Specified by:
size
in interfaceMap<K,
Collection<V>> - Overrides:
size
in classAbstractMap<K,
Collection<V>>
-
remove
- Specified by:
remove
in interfaceMap<K,
Collection<V>> - Overrides:
remove
in classAbstractMap<K,
Collection<V>>
-
equals
- Specified by:
equals
in interfaceMap<K,
Collection<V>> - Overrides:
equals
in classAbstractMap<K,
Collection<V>>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceMap<K,
Collection<V>> - Overrides:
hashCode
in classAbstractMap<K,
Collection<V>>
-
toString
- Overrides:
toString
in classAbstractMap<K,
Collection<V>>
-
clear
public void clear()- Specified by:
clear
in interfaceMap<K,
Collection<V>> - Overrides:
clear
in classAbstractMap<K,
Collection<V>>
-
wrapEntry
-