Class AbstractMap.SimpleEntry<K,V>
java.lang.Object
java.util.AbstractMap.SimpleEntry<K,V>
- All Implemented Interfaces:
Map.Entry<K,V>
- Enclosing class:
AbstractMap<K,V>
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleEntry(Map.Entry<? extends K, ? extends V> entry) Constructs a new instance by an entrySimpleEntry(K theKey, V theValue) Constructs a new instance by key and value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAnswers whether the object is equal to this entry.getKey()Returns the key.getValue()Returns the value.inthashCode()Answers the hash code of this entry.Sets the value of this entry to the specified value, replacing any existing value.toString()Answers a String representation of this entry.
-
Constructor Details
-
SimpleEntry
-
SimpleEntry
-
-
Method Details
-
getKey
-
getValue
-
setValue
Sets the value of this entry to the specified value, replacing any existing value.
Parameters
object: the new value to set.
Returns
object the replaced value of this entry.
See also
- java.util.Map.Entry#setValue(java.lang.Object)
-
equals
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
-