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()
void
clear()
boolean
containsKey(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()
void
forEach(java.util.function.BiConsumer<? super K,? super V> action)
V
get(java.lang.Object key)
V
getOrDefault(java.lang.Object key, V defaultValue)
V
remove(java.lang.Object key)
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
-
-
-
-
Method Detail
-
backingSet
java.util.Set<K> backingSet()
-
createKeySet
public java.util.Set<K> createKeySet()
- Overrides:
createKeySet
in classMaps.ViewCachingAbstractMap<K,V>
-
createValues
java.util.Collection<V> createValues()
- Overrides:
createValues
in 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.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>
-
-