|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.keyvalue.AbstractKeyValue org.apache.commons.collections.keyvalue.AbstractMapEntry
public abstract class AbstractMapEntry
Abstract Pair class to assist with creating correct
Map.Entry
implementations.
Field Summary |
---|
Fields inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue |
---|
key, value |
Constructor Summary | |
---|---|
protected |
AbstractMapEntry(java.lang.Object key,
java.lang.Object value)
Constructs a new entry with the given key and given value. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this Map.Entry with another Map.Entry . |
int |
hashCode()
Gets a hashCode compatible with the equals method. |
java.lang.Object |
setValue(java.lang.Object value)
Sets the value stored in this Map.Entry . |
Methods inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue |
---|
getKey, getValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map.Entry |
---|
getKey, getValue |
Constructor Detail |
---|
protected AbstractMapEntry(java.lang.Object key, java.lang.Object value)
key
- the key for the entry, may be nullvalue
- the value for the entry, may be nullMethod Detail |
---|
public java.lang.Object setValue(java.lang.Object value)
Map.Entry
.
This Map.Entry
is not connected to a Map, so only the
local data is changed.
setValue
in interface java.util.Map.Entry
value
- the new value
public 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.Entry
equals
in class java.lang.Object
obj
- the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode
in interface java.util.Map.Entry
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |