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 TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet().(package private) Collection<V> voidforEach(BiConsumer<? super K, ? super V> action) getOrDefault(Object key, V defaultValue) intsize()Methods inherited from class com.google.common.collect.Maps.ViewCachingAbstractMap
entrySet, keySet, valuesMethods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, 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, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
set
-
function
-
-
Constructor Details
-
AsMapView
-
-
Method Details
-
backingSet
-
createKeySet
- Overrides:
createKeySetin classMaps.ViewCachingAbstractMap<K,V>
-
createValues
Collection<V> createValues()- Overrides:
createValuesin classMaps.ViewCachingAbstractMap<K,V>
-
size
public int size() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
get
-
getOrDefault
-
remove
-
clear
public void clear() -
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,V>
-
forEach
-