public abstract class ForwardingMap<K,V> extends Object implements Map<K,V>
| Constructor and Description |
|---|
ForwardingMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
protected Set<Map.Entry<K,V>> |
createEntrySet()
Generates a
Set for use by entrySet(). |
protected Set<K> |
createKeySet()
|
protected Collection<V> |
createValues()
Generates a
Collection for use by values(). |
protected abstract Map<K,V> |
delegate() |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object object) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
V |
remove(Object object) |
int |
size() |
String |
toString() |
Collection<V> |
values() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>protected Set<K> createKeySet()
Set for use by keySet().
ForwardingMap's implementation of keySet() calls this method to generate a collection of values, and then reuses that Set for subsequent invocations. By default, this Set is the result of invoking keySet() on the delegate. Override this method if you want to provide another implementation.
protected Collection<V> createValues()
Collection for use by values().
ForwardingMap's implementation of values() calls this method to
generate a collection of values, and then reuses that collection
for subsequent invocations. By default, this collection is the
result of invoking values() on the delegate. Override this method if you
want to provide another implementation.
protected Set<Map.Entry<K,V>> createEntrySet()
Set for use by entrySet().
ForwardingMap's implementation of entrySet() calls this method to generate a set of entries, and then reuses that set for subsequent invocations. By default, this set is the result of invoking entrySet() on the delegate. Override this method if you want to provide another implementation.
public boolean equals(Object object)
public int hashCode()
Copyright © 2026. All rights reserved.