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:
java.util.Map<K,V>
- Direct Known Subclasses:
Maps.SortedAsMapView
- Enclosing class:
- Maps
private static class Maps.AsMapView<K,V> extends Maps.ViewCachingAbstractMap<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.Set<K>backingSet()voidclear()booleancontainsKey(java.lang.Object key)protected java.util.Set<java.util.Map.Entry<K,V>>createEntrySet()Creates the entry set to be returned byMaps.ViewCachingAbstractMap.entrySet().java.util.Set<K>createKeySet()(package private) java.util.Collection<V>createValues()voidforEach(java.util.function.BiConsumer<? super K,? super V> action)Vget(java.lang.Object key)VgetOrDefault(java.lang.Object key, V defaultValue)Vremove(java.lang.Object key)intsize()-
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
-
-
-
-
Method Detail
-
backingSet
java.util.Set<K> backingSet()
-
createKeySet
public java.util.Set<K> createKeySet()
- Overrides:
createKeySetin classMaps.ViewCachingAbstractMap<K,V>
-
createValues
java.util.Collection<V> createValues()
- Overrides:
createValuesin classMaps.ViewCachingAbstractMap<K,V>
-
size
public int size()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
get
public V get(java.lang.Object key)
-
remove
public V remove(java.lang.Object key)
-
clear
public void clear()
-
createEntrySet
protected java.util.Set<java.util.Map.Entry<K,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,V>
-
-