|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections.DefaultMapEntry
public class DefaultMapEntry
A default implementation of Map.Entry
| Constructor Summary | |
|---|---|
DefaultMapEntry()
Deprecated. Constructs a new DefaultMapEntry with a null key
and null value. |
|
DefaultMapEntry(java.util.Map.Entry entry)
Deprecated. Constructs a new DefaultMapEntry with the given
key and given value. |
|
DefaultMapEntry(java.lang.Object key,
java.lang.Object value)
Deprecated. Constructs a new DefaultMapEntry with the given
key and given value. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Deprecated. Compares this Map Entry with another Map Entry. |
java.lang.Object |
getKey()
Deprecated. Gets the key from the Map Entry. |
java.lang.Object |
getValue()
Deprecated. Gets the value from the Map Entry. |
int |
hashCode()
Deprecated. Gets a hashCode compatible with the equals method. |
void |
setKey(java.lang.Object key)
Deprecated. Sets the key stored in this Map Entry. |
java.lang.Object |
setValue(java.lang.Object value)
Deprecated. Sets the value stored in this Map Entry. |
java.lang.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(java.util.Map.Entry entry)
DefaultMapEntry with the given
key and given value.
entry - the entry to copy, must not be null
java.lang.NullPointerException - if the entry is null
public DefaultMapEntry(java.lang.Object key,
java.lang.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 java.lang.Object getKey()
getKey in interface java.util.Map.EntrygetKey in interface KeyValuepublic void setKey(java.lang.Object key)
This Map Entry is not connected to a Map, so only the local data is changed.
key - the new keypublic java.lang.Object getValue()
getValue in interface java.util.Map.EntrygetValue in interface KeyValuepublic java.lang.Object setValue(java.lang.Object value)
This Map Entry is not connected to a Map, so only the local data is changed.
setValue in interface java.util.Map.Entryvalue - the new value
public boolean equals(java.lang.Object obj)
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()
HashMap.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||