public class TiedMapEntry<K,V> extends Objectimplements Map .Entry <K ,V>, KeyValue <K ,V>, Serializable
Map.Entry tied to a map underneath.
This can be used to enable a map entry to make changes on the underlying map, however this will probably mess up any iterators.
| Constructor and Description |
|---|
TiedMapEntry(Map
Constructs a new entry with the given Map and key.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object
Compares this
Map.Entry with another
Map.Entry.
|
K |
getKey()
Gets the key of this entry
|
V |
getValue()
Gets the value of this entry direct from the map.
|
int |
hashCode()
Gets a hashCode compatible with the equals method.
|
V |
setValue(V value)
Sets the value associated with the key direct onto the map.
|
String |
toString()
Gets a string version of the entry.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValuepublic K getKey()
public V getValue()
public V setValue(V value)
setValue in interface
Map.Entry <K,V>
value - the new value
IllegalArgumentException - if the value is set to this map entry
public boolean equals(Objectobj)
Map.Entry with another
Map.Entry.
Implemented per API documentation of Map
public int hashCode()
Implemented per API documentation of Map