|
|||||||||||
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()
Constructs a new DefaultMapEntry with a null key
and null value. |
|
DefaultMapEntry(java.lang.Object key,
java.lang.Object value)
Constructs a new DefaultMapEntry with the given
key and given value. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Implemented per API documentation of Map.Entry.equals(Object) |
java.lang.Object |
getKey()
Returns the key. |
java.lang.Object |
getValue()
Returns the value. |
int |
hashCode()
Implemented per API documentation of Map.Entry.hashCode() |
void |
setKey(java.lang.Object key)
Sets the key. |
java.lang.Object |
setValue(java.lang.Object value)
Note that this method only sets the local reference inside this object and does not modify the original Map. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultMapEntry()
DefaultMapEntry
with a null key
and null value.
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 entyr, may be nullMethod Detail |
public boolean equals(java.lang.Object o)
Map.Entry.equals(Object)
equals
in interface java.util.Map.Entry
equals
in class java.lang.Object
public int hashCode()
Map.Entry.hashCode()
hashCode
in interface java.util.Map.Entry
hashCode
in class java.lang.Object
public java.lang.Object getKey()
getKey
in interface java.util.Map.Entry
public java.lang.Object getValue()
getValue
in interface java.util.Map.Entry
public void setKey(java.lang.Object key)
key
- the new keypublic java.lang.Object setValue(java.lang.Object value)
setValue
in interface java.util.Map.Entry
value
- the new value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |