java.util
Interface Map.Entry<K,V>

All Known Implementing Classes:
HashMap.Entry
Enclosing interface:
Map<K,V>

public static interface Map.Entry<K,V>

A map entry (key-value pair). The Map.entrySet method returns a collection-view of the map, whose elements are of this class. The only way to obtain a reference to a map entry is from the iterator of this collection-view.


Method Summary
 boolean equals(Object o)
          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).
 

Method Detail

equals

boolean equals(Object o)
Compares the specified object with this entry for equality.

Overrides:
equals in class Object

getKey

K getKey()
Returns the key corresponding to this entry.


getValue

V getValue()
Returns the value corresponding to this entry.


hashCode

int hashCode()
Returns the hash code value for this map entry.

Overrides:
hashCode in class Object

setValue

V setValue(V value)
Replaces the value corresponding to this entry with the specified value (optional operation).