K
- the type of the key of this entry.V
- the type of the value of this entry.public class MapEntry<K,V>
extends java.lang.Object
implements java.util.Map.Entry<K,V>
Map
.Modifier | Constructor and Description |
---|---|
private |
MapEntry(K key,
V value) |
Modifier and Type | Method and Description |
---|---|
static <K,V> MapEntry<K,V> |
entry(K key,
V value)
Creates a new
MapEntry . |
boolean |
equals(java.lang.Object object) |
K |
getKey() |
V |
getValue() |
int |
hashCode() |
V |
setValue(V value)
Always throws UnsupportedOperationException,
as this class represents an immutable map entry.
|
java.lang.String |
toString() |
public static <K,V> MapEntry<K,V> entry(K key, V value)
MapEntry
.K
- the type of the key of this entry.V
- the type of the value of this entry.key
- the key of the entry to create.value
- the value of the entry to create.MapEntry
.public boolean equals(java.lang.Object object)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object