public static interface Map4D.Entry<K,V>
Map
,
Map.entrySet()
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.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).
|
K getKey()
V getValue()
V setValue(V value)
value
- the new value to storejava.lang.UnsupportedOperationException
- if the operation is not supportedjava.lang.ClassCastException
- if the value is of the wrong typejava.lang.IllegalArgumentException
- if something about the value
prevents it from existing in this mapjava.lang.NullPointerException
- if the map forbids null valuesint hashCode()
null
). In other words, this must be:
(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())
hashCode
in class java.lang.Object
boolean equals(java.lang.Object o)
(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()))
equals
in class java.lang.Object
o
- the object to comparetrue
if it is equal