|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface MapIF.Entry
A map entry (key-value pair) for MapIF. The MapIF.entrySet method returns a collection-view of the map, whose elements are of this class. The only way to obtain a reference to a map entry is from the iterator of this collection-view. These MapIF.Entry objects are valid only for the duration of the iteration; more formally, the behavior of a map entry is undefined if the backing map has been modified after the entry was returned by the iterator, except through the setValue operation on the map entry.
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Compares the specified object with this entry for equality. |
int |
getKey()
Returns the key corresponding to this entry. |
float |
getValue()
Returns the value corresponding to this entry. |
int |
hashCode()
Returns the hash code value for this map entry. |
float |
setValue(float value)
Replaces the value corresponding to this entry with the specified value, and write through to the backing map. |
| Method Detail |
|---|
int getKey()
float getValue()
float setValue(float value)
value - new value to be stored in this entry
boolean equals(Object o)
equals in class Objecto - object to be compared for equality with this map entry
int hashCode()
e.getKey() ˆ e.getValue().hashCode()This ensures that e1.equals(e2) implies that e1.hashCode()==e2.hashCode() for any two Entries e1 and e2, as required by the general contract of Object.hashCode.
hashCode in class ObjectObject.hashCode(),
Object.equals(Object),
equals(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||