|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 key| Method Detail |
|---|
public java.lang.Object getKey()
getKey in interface java.util.Map.EntrygetKey in interface KeyValuepublic java.lang.Object getValue()
getValue in interface java.util.Map.EntrygetValue in interface KeyValuepublic java.lang.Object setValue(java.lang.Object value)
setValue in interface java.util.Map.Entryvalue - 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.Entryequals in class java.lang.Objectobj - the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode in interface java.util.Map.EntryhashCode in class java.lang.Objectpublic 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 | |||||||||