public static class AbstractMap.SimpleImmutableEntry<K,V> extends Object implements Map.Entry<K,V>
Entry#setValue(V)
for this class
simply throws an UnsupportedOperationException
,
thus preventing changes being made. This is useful when
a static thread-safe view of a map is required.Constructor and Description |
---|
SimpleImmutableEntry(K key,
V value) |
SimpleImmutableEntry(Map.Entry<? extends K,? extends V> entry) |
Modifier and Type | Method and Description |
---|---|
K |
getKey()
Get the key corresponding to this entry.
|
V |
getValue()
Get the value corresponding to this entry.
|
V |
setValue(V value)
Replaces the value with the specified object (optional operation).
|
public K getKey()
Map.Entry
public V getValue()
Map.Entry