Package com.google.common.collect
Class Maps.AsMapView<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.google.common.collect.Maps.ViewCachingAbstractMap<K,V>
com.google.common.collect.Maps.AsMapView<K,V>
- All Implemented Interfaces:
Map<K,
V>
- Direct Known Subclasses:
Maps.SortedAsMapView
- Enclosing class:
Maps
-
Nested Class Summary
Nested 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) Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet()
.(package private) Collection
<V> void
forEach
(BiConsumer<? super K, ? super V> action) getOrDefault
(Object key, V defaultValue) int
size()
Methods inherited from class com.google.common.collect.Maps.ViewCachingAbstractMap
entrySet, keySet, values
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, 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, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
set
-
function
-
-
Constructor Details
-
AsMapView
-
-
Method Details
-
backingSet
-
createKeySet
- Overrides:
createKeySet
in classMaps.ViewCachingAbstractMap<K,
V>
-
createValues
Collection<V> createValues()- Overrides:
createValues
in classMaps.ViewCachingAbstractMap<K,
V>
-
size
public int size() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
V>
-
get
-
getOrDefault
-
remove
-
clear
public void clear() -
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,
V>
-
forEach
-