Class AbstractMap.SimpleImmutableEntry<K,V>
java.lang.Object
java.util.AbstractMap.SimpleImmutableEntry<K,V>
- All Implemented Interfaces:
Map.Entry<K,V>
- Enclosing class:
AbstractMap<K,V>
public static class AbstractMap.SimpleImmutableEntry<K,V>
extends java.lang.Object
implements Map.Entry<K,V>
An immutable key-value mapping.
Type parameter K: the type of key
Type parameter V: the type of value
Since
1.6
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleImmutableEntry(Map.Entry<? extends K, ? extends V> entry) Constructs a new instance by an entrySimpleImmutableEntry(K theKey, V theValue) Constructs a new instance by key and value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(java.lang.Object object) Answers whether the object is equal to this entry.getKey()Returns the key.getValue()Returns the value.inthashCode()Answers the hash code of this entry.Throws an UnsupportedOperationException.toString()Answers a String representation of this entry.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
SimpleImmutableEntry
-
SimpleImmutableEntry
-
-
Method Details
-
getKey
-
getValue
-
setValue
-
equals
public boolean equals(java.lang.Object object) Answers whether the object is equal to this entry. This works across all kinds of the Map.Entry interface.
See also
- java.lang.Object#equals(java.lang.Object)
-
hashCode
-
toString
Answers a String representation of this entry.
See also
- java.lang.Object#toString()
- Overrides:
toStringin classjava.lang.Object
-