| Constructor and Description |
|---|
ImmutableMapEntry(K key,
V value)
Construct an
ImmutableMapEntry with the given key and value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Compare with another object for equality.
|
K |
getKey()
Get the key.
|
V |
getValue()
Get the value.
|
int |
hashCode()
This is coded to match exactly the hash calculation used by
HashMap. |
V |
setValue(V value)
Modifying operation - not allowed.
|
String |
toString()
Create a string representation of this
ImmutableMapEntry, in the form "key=value". |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValuepublic K getKey()
public V getValue()
public V setValue(V value)
setValue in interface Map.Entry<K,V>UnsupportedOperationException - (in all cases)public boolean equals(Object other)
Map.Entry with the same key and value is
considered equal (where the key and value equality tests are done by Objects.equals(java.lang.Object, java.lang.Object).public int hashCode()
HashMap.Copyright © 2022. All rights reserved.