Package com.globalmentor.collections
Class MapEntryMap<K,V>
java.lang.Object
com.globalmentor.collections.MapEntryMap<K,V>
- Type Parameters:
K
- The type of key contained in the map.V
- The type of value contained in the map.
- All Implemented Interfaces:
ImmutableMap<K,
,V> Map<K,
V>
A read-only map containing a single map entry.
- Author:
- Garret Wilson
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionMapEntryMap
(NameValuePair<K, V> nameValuePair) Name/value pair copy constructor.MapEntryMap
(Map.Entry<K, V> mapEntry) Map entry copy constructor.MapEntryMap
(K key, V value) Key and value constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapEntryMap
Key and value constructor.- Parameters:
key
- The key to hold in the map.value
- The value to hold in the map.
-
MapEntryMap
Name/value pair copy constructor.- Parameters:
nameValuePair
- The name/value pair the values of which to hold in the map.- Throws:
NullPointerException
- if the given name/value pair isnull
.
-
MapEntryMap
Map entry copy constructor.- Parameters:
mapEntry
- The map entry the values of which to hold in the map.- Throws:
NullPointerException
- if the given map entry isnull
.
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode()
-