java.util

Class AbstractMap.SimpleImmutableEntry<K,V>

public static class AbstractMap.SimpleImmutableEntry<K,V> extends Object implements Entry<K,V>, Serializable

A class containing an immutable key and value. The implementation of {@link Entry#setValue(V)} for this class simply throws an {@link UnsupportedOperationException}, thus preventing changes being made. This is useful when a static thread-safe view of a map is required.

Since: 1.6

Constructor Summary
SimpleImmutableEntry(K key, V value)
SimpleImmutableEntry(Entry<? extends K,? extends V> entry)
Method Summary
KgetKey()
VgetValue()
VsetValue(V value)

Constructor Detail

SimpleImmutableEntry

public SimpleImmutableEntry(K key, V value)

SimpleImmutableEntry

public SimpleImmutableEntry(Entry<? extends K,? extends V> entry)

Method Detail

getKey

public K getKey()

getValue

public V getValue()

setValue

public V setValue(V value)