|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.collections.keyvalue.TiedMapEntry
A 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 Summary | |
TiedMapEntry(Map map,
Object key)
Constructs a new entry with the given Map and key. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TiedMapEntry(Map map, Object key)
map
- the mapkey
- the keyMethod Detail |
public Object getKey()
getKey
in interface Map.Entry
public Object getValue()
getValue
in interface Map.Entry
public Object setValue(Object value)
setValue
in interface Map.Entry
value
- the new value
IllegalArgumentException
- if the value is set to this map entrypublic boolean equals(Object obj)
Implemented per API documentation of Map.Entry.equals(Object)
equals
in interface Map.Entry
equals
in class Object
obj
- the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode
in interface Map.Entry
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |