abstract static class Maps.ViewCachingAbstractMap<K,V>
extends java.util.AbstractMap<K,V>
AbstractMap extension that makes it easy to cache customized keySet, values, and
entrySet views.| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<java.util.Map.Entry<K,V>> |
entrySet |
private java.util.Set<K> |
keySet |
private java.util.Collection<V> |
values |
| Constructor and Description |
|---|
ViewCachingAbstractMap() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract java.util.Set<java.util.Map.Entry<K,V>> |
createEntrySet()
Creates the entry set to be returned by
entrySet(). |
(package private) java.util.Set<K> |
createKeySet() |
(package private) java.util.Collection<V> |
createValues() |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
java.util.Set<K> |
keySet() |
java.util.Collection<V> |
values() |
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, toString@CheckForNull private transient java.util.Set<K> keySet
@CheckForNull private transient java.util.Collection<V> values
abstract java.util.Set<java.util.Map.Entry<K,V>> createEntrySet()
entrySet(). This method is invoked at most
once on a given map, at the time when entrySet is first called.public java.util.Set<K> keySet()
java.util.Set<K> createKeySet()
public java.util.Collection<V> values()
java.util.Collection<V> createValues()