|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.util.mod.AbstractMapPro.SimpleImmutableEntry<K,V>
public static class AbstractMapPro.SimpleImmutableEntry<K,V>
An Entry maintaining an immutable key and value. This class does not support method setValue. This class may be convenient in methods that return thread-safe snapshots of key-value mappings.
Constructor Summary | |
---|---|
AbstractMapPro.SimpleImmutableEntry(K key,
V value)
Creates an entry representing a mapping from the specified key to the specified value. |
|
AbstractMapPro.SimpleImmutableEntry(Map.Entry<? extends K,? extends V> entry)
Creates an entry representing the same mapping as the specified entry. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
K |
getKey()
Returns the key corresponding to this entry. |
V |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
|
V |
setValue(V value)
Replaces the value corresponding to this entry with the specified value (optional operation). |
String |
toString()
Returns a String representation of this map entry. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractMapPro.SimpleImmutableEntry(K key, V value)
key
- the key represented by this entryvalue
- the value represented by this entrypublic AbstractMapPro.SimpleImmutableEntry(Map.Entry<? extends K,? extends V> entry)
entry
- the entry to copyMethod Detail |
---|
public K getKey()
getKey
in interface Map.Entry<K,V>
public V getValue()
getValue
in interface Map.Entry<K,V>
public V setValue(V value)
setValue
in interface Map.Entry<K,V>
value
- new value to be stored in this entry
UnsupportedOperationException
- alwayspublic boolean equals(Object o)
equals
in interface Map.Entry<K,V>
equals
in class Object
public int hashCode()
hashCode
in interface Map.Entry<K,V>
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |