Build 1.0_r1(from source)

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

All Known Implementing Classes:
ConcurrentHashMap.EntryIterator, ConcurrentHashMap.SimpleEntry, HashMap.Entry, IdentityHashMap.IdentityHashMapEntry, LinkedHashMap.LinkedHashMapEntry, MapEntry, TreeMap.Entry
Enclosing interface:
Map<K,V>

public static interface Map.Entry<K,V>

Map.Entry is a key/value mapping which is contained in a Map.


Method Summary
 boolean equals(Object object)
          Compares the specified object to this Map.Entry and answer if they are equal.
 K getKey()
          Gets the key.
 V getValue()
          Gets the value.
 int hashCode()
          Returns an integer hash code for the receiver.
 V setValue(V object)
          Sets the value.
 

Method Detail

equals

boolean equals(Object object)
Compares the specified object to this Map.Entry and answer if they are equal. The object must be an instance of Map.Entry and have the same key and value.

Overrides:
equals in class Object
Parameters:
object - the object to compare with this object
Returns:
true if the specified object is equal to this Map.Entry, false otherwise
See Also:
hashCode()

getKey

K getKey()
Gets the key.

Returns:
the key

getValue

V getValue()
Gets the value.

Returns:
the value

hashCode

int hashCode()
Returns an integer hash code for the receiver. Objects which are equal answer the same value for this method.

Overrides:
hashCode in class Object
Returns:
the receiver's hash
See Also:
equals(java.lang.Object)

setValue

V setValue(V object)
Sets the value.

Parameters:
object - the new value
Returns:
object

Build 1.0_r1(from source)

Please submit a feedback, bug or feature