java.util
public static interface Map.Entry<K,V>
Since: 1.2
UNKNOWN: updated to 1.4
Method Summary | |
---|---|
boolean | equals(Object o)
Compares the specified object with this entry. |
K | getKey()
Get the key corresponding to this entry.
|
V | getValue()
Get the value corresponding to this entry. |
int | hashCode()
Returns the hash code of the entry. |
V | setValue(V value)
Replaces the value with the specified object (optional operation).
|
(o instanceof Map.Entry) && (getKey() == null ? ((Map.Entry) o).getKey() == null : getKey().equals(((Map.Entry) o).getKey())) && (getValue() == null ? ((Map.Entry) o).getValue() == null : getValue().equals(((Map.Entry) o).getValue()))
Parameters: o the object to compare
Returns: true
if it is equal
Returns: the key
Returns: the value
null
). In other words, this must be:
(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())
Returns: the hash code
Parameters: value the new value to store
Returns: the old value
Throws: UnsupportedOperationException if the operation is not supported ClassCastException if the value is of the wrong type IllegalArgumentException if something about the value prevents it from existing in this map NullPointerException if the map forbids null values