|
JUtil | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.cscott.jutil.AbstractMapEntry<K,V>
public abstract class AbstractMapEntry<K,V>
An AbstractMapEntry takes care of most of the grunge
work involved in subclassing Map.Entry. For
an immutable entry, you need only implement getKey()
and getValue(). For a modifiable entry, you must also
implement setValue(Object); 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 K |
getKey()
Returns the key corresponding to this entry. |
abstract V |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
Returns the hash code value for this map entry. |
V |
setValue(V 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 K getKey()
getKey in interface Map.Entry<K,V>public abstract V getValue()
remove() operation), the results of this call are
undefined.
getValue in interface Map.Entry<K,V>public V setValue(V value)
remove()
operation).
setValue in interface Map.Entry<K,V>public String toString()
toString in class Objectpublic 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<K,V>equals in class Objectpublic int hashCode()
hashCode in interface Map.Entry<K,V>hashCode in class Object
|
JUtil | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||