Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object x)
Compares the specified object with this entry for equality.
|
From |
getKey()
Answer the key for the entry
|
To |
getValue()
Answer the value for the entry
|
int |
hashCode()
Returns the hash code value for this map entry.
|
To |
setValue(To value)
Set the value, which writes through to the map.
|
getClass, notify, notifyAll, toString, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue
public boolean equals(Object x)
(e1.getKey()==null ?
e2.getKey()==null : e1.getKey().equals(e2.getKey())) &&
(e1.getValue()==null ?
e2.getValue()==null : e1.getValue().equals(e2.getValue()))
This ensures that the equals method works properly across different implementations of the Map.Entry interface.public From getKey()
public To getValue()
public To setValue(To value) throws UnsupportedOperationException
setValue
in interface Map.Entry<From,To>
UnsupportedOperationException
public int hashCode()
Licenced under the Apache License, Version 2.0