|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Util.Collections.AbstractMapEntry
An AbstractMapEntry
takes care of most of the grunge
work involved in subclassing java.util.Map.Entry
. For
an immutable entry, you need only implement getKey()
and getValue()
. For a modifiable entry, you must also
implement setValue()
; the default implementation throws
an UnsupportedOperationException
.
Constructor Summary | |
AbstractMapEntry()
|
Method Summary | |
boolean |
equals(Object o)
Compares the specified object with this entry for equality. |
abstract Object |
getKey()
Returns the key corresponding to this entry. |
abstract Object |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
Returns the hash code value for this map entry. |
Object |
setValue(Object value)
Replaces the value corresponding to this entry with the specified value (optional operation). |
String |
toString()
Returns a human-readable representation of this map entry. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractMapEntry()
Method Detail |
public abstract Object getKey()
getKey
in interface Map.Entry
public abstract Object getValue()
remove()
operation), the results of this call are
undefined.
getValue
in interface Map.Entry
public Object setValue(Object value)
remove()
operation).
setValue
in interface Map.Entry
public String toString()
toString
in class Object
public boolean equals(Object o)
true
if the given object is also a map
entry and the two entries represent the same mapping.
equals
in interface Map.Entry
equals
in class Object
public int hashCode()
hashCode
in interface Map.Entry
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |