|
||||||||||
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
public class 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(java.util.Map map,
java.lang.Object key)
Constructs a new entry with the given Map and key. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this Map.Entry with another Map.Entry . |
java.lang.Object |
getKey()
Gets the key of this entry |
java.lang.Object |
getValue()
Gets the value of this entry direct from the map. |
int |
hashCode()
Gets a hashCode compatible with the equals method. |
java.lang.Object |
setValue(java.lang.Object value)
Sets the value associated with the key direct onto the map. |
java.lang.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(java.util.Map map, java.lang.Object key)
map
- the mapkey
- the keyMethod Detail |
---|
public java.lang.Object getKey()
getKey
in interface java.util.Map.Entry
getKey
in interface KeyValue
public java.lang.Object getValue()
getValue
in interface java.util.Map.Entry
getValue
in interface KeyValue
public java.lang.Object setValue(java.lang.Object value)
setValue
in interface java.util.Map.Entry
value
- the new value
java.lang.IllegalArgumentException
- if the value is set to this map entrypublic boolean equals(java.lang.Object obj)
Map.Entry
with another Map.Entry
.
Implemented per API documentation of Map.Entry.equals(Object)
equals
in interface java.util.Map.Entry
equals
in class java.lang.Object
obj
- the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode
in interface java.util.Map.Entry
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |