Class ForwardingMap<K,V>
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
StandardBiMap
- Author:
- Kevin Bourrillion, Jared Levy
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) Generates aSetfor use byentrySet().protected Collection<V>Generates aCollectionfor use byvalues().delegate()entrySet()booleaninthashCode()booleanisEmpty()keySet()voidintsize()toString()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ForwardingMap
public ForwardingMap()
-
-
Method Details
-
delegate
-
size
public int size() -
isEmpty
public boolean isEmpty() -
remove
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
putAll
-
keySet
-
createKeySet
Generates aSetfor use bykeySet().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.
- Returns:
- A set for use by keySet().
-
values
-
createValues
Generates aCollectionfor use byvalues().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.- Returns:
- A set for use by values().
-
entrySet
-
createEntrySet
Generates aSetfor use byentrySet().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.
- Returns:
- A set for use by entrySet().
-
equals
-
hashCode
public int hashCode() -
toString
-