|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.DefaultMapEntry
A default implementation of Map.Entry
| Constructor Summary | |
DefaultMapEntry()
Deprecated. Constructs a new DefaultMapEntry with a null key
and null value. |
|
DefaultMapEntry(Map.Entry entry)
Deprecated. Constructs a new DefaultMapEntry with the given
key and given value. |
|
DefaultMapEntry(Object key,
Object value)
Deprecated. Constructs a new DefaultMapEntry with the given
key and given value. |
|
| Method Summary | |
boolean |
equals(Object obj)
Deprecated. Compares this Map Entry with another Map Entry. |
Object |
getKey()
Deprecated. Gets the key from the Map Entry. |
Object |
getValue()
Deprecated. Gets the value from the Map Entry. |
int |
hashCode()
Deprecated. Gets a hashCode compatible with the equals method. |
void |
setKey(Object key)
Deprecated. Sets the key stored in this Map Entry. |
Object |
setValue(Object value)
Deprecated. Sets the value stored in this Map Entry. |
String |
toString()
Deprecated. Written to match the output of the Map.Entry's used in a HashMap. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultMapEntry()
DefaultMapEntry with a null key
and null value.
public DefaultMapEntry(Map.Entry entry)
DefaultMapEntry with the given
key and given value.
entry - the entry to copy, must not be null
NullPointerException - if the entry is null
public DefaultMapEntry(Object key,
Object value)
DefaultMapEntry with the given
key and given value.
key - the key for the entry, may be nullvalue - the value for the entry, may be null| Method Detail |
public Object getKey()
getKey in interface Map.Entrypublic void setKey(Object key)
This Map Entry is not connected to a Map, so only the local data is changed.
key - the new keypublic Object getValue()
getValue in interface Map.Entrypublic Object setValue(Object value)
This Map Entry is not connected to a Map, so only the local data is changed.
setValue in interface Map.Entryvalue - the new value
public boolean equals(Object obj)
Implemented per API documentation of Map.Entry.equals(Object)
equals in interface Map.Entryobj - the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode in interface Map.Entrypublic String toString()
HashMap.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||