|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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 nullpublic 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 nullMethod Detail |
public Object getKey()
getKey
in interface Map.Entry
public 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.Entry
public Object setValue(Object value)
This Map Entry is not connected to a Map, so only the local data is changed.
setValue
in interface Map.Entry
value
- the new value
public 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()
HashMap
.
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |