|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMapEntry<K,V>
public class MapEntry<K,V>
A default implementation of Map.Entry
which map an arbitrary
key-value pairs. This entry is immutable by default.
Constructor Summary | |
---|---|
MapEntry(K key,
V value)
Creates a new map entry with the specified key-value pair. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Compares the specified object with this entry for equality. |
K |
getKey()
Returns the key corresponding to this entry. |
V |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
Returns the hash code value for this map entry |
V |
setValue(V value)
Replaces the value corresponding to this entry with the specified value (optional operation). |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapEntry(K key, V value)
key
- The key.value
- The value.Method 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)
UnsupportedOperationException
.
setValue
in interface Map.Entry<K,V>
public boolean equals(Object object)
equals
in interface Map.Entry<K,V>
equals
in class Object
object
- The object to compare with this entry for equality.public int hashCode()
hashCode
in interface Map.Entry<K,V>
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |