K
- the key typeV
- the value typepublic final class MapEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
Constructor and Description |
---|
MapEntry(K key,
V value)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> Map<K,V> |
addTo(Map<K,V> map,
MapEntry<? extends K,? extends V>... entries)
Add entries to a map.
|
static <K,V> MapEntry<K,V> |
entry(K key,
V value)
Construct a new instance.
|
boolean |
equals(MapEntry<?,?> obj)
Compare this entry with another.
|
boolean |
equals(Object obj)
Compare this entry with another.
|
K |
getKey()
Get the map key.
|
V |
getValue()
Get the map value.
|
int |
hashCode()
Get the hash code of this object.
|
V |
setValue(V value)
Unsupported operation.
|
public static <K,V> MapEntry<K,V> entry(K key, V value)
K
- the key typeV
- the value typekey
- the map keyvalue
- the map valuepublic K getKey()
public V getValue()
public V setValue(V value)
setValue
in interface Map.Entry<K,V>
value
- ignoredUnsupportedOperationException
- alwayspublic boolean equals(Object obj)
public boolean equals(MapEntry<?,?> obj)
obj
- the other entrytrue
if this object equals the other MapEntry
instance, false
otherwisepublic int hashCode()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.