public class TiedMapEntry extends Object implements Map.Entry, KeyValue, 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 map,
Object key)
Constructs a new entry with the given Map and key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this
Map.Entry with another Map.Entry . |
Object |
getKey()
Gets the key of this entry
|
Object |
getValue()
Gets the value of this entry direct from the map.
|
int |
hashCode()
Gets a hashCode compatible with the equals method.
|
Object |
setValue(Object value)
Sets the value associated with the key direct onto the map.
|
String |
toString()
Gets a string version of the entry.
|
public Object getKey()
public Object getValue()
public Object setValue(Object value)
setValue
in interface Map.Entry
value
- the new valueIllegalArgumentException
- if the value is set to this map entrypublic boolean equals(Object obj)
Map.Entry
with another Map.Entry
.
Implemented per API documentation of Map.Entry.equals(Object)
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.