|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface LongKeyMap.Entry<V>
A map entry (key-value pair). The Map.entrySet() method returns a set view of these objects; there is no other valid way to come across them. These objects are only valid for the duration of an iteration; in other words, if you mess with one after modifying the map, you are asking for undefined behavior.
LongKeyMap,
LongKeyMap.entrySet()| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this entry. |
long |
getKey()
Get the key corresponding to this entry. |
V |
getValue()
Get the value corresponding to this entry. |
int |
hashCode()
Returns the hash code of the entry. |
V |
setValue(V value)
Replaces the value with the specified object (optional operation). |
| Method Detail |
|---|
long getKey()
V getValue()
V setValue(V value)
value - the new value to store
java.lang.UnsupportedOperationException - if the operation is not supported
java.lang.ClassCastException - if the value is of the wrong type
java.lang.IllegalArgumentException - if something about the value
prevents it from existing in this map
java.lang.NullPointerException - if the map forbids null valuesint hashCode()
null). In other words, this must be:
(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())
hashCode in class java.lang.Objectboolean equals(java.lang.Object o)
(o instanceof Map.Entry)
&& (getKey() == null ? ((Map.Entry) o).getKey() == null
: getKey().equals(((Map.Entry) o).getKey()))
&& (getValue() == null ? ((Map.Entry) o).getValue() == null
: getValue().equals(((Map.Entry) o).getValue()))
equals in class java.lang.Objecto - the object to compare
true if it is equal
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||