Module java.base
Package java.util

Class AbstractMap.SimpleEntry<K,V>

java.lang.Object
java.util.AbstractMap.SimpleEntry<K,V>
Type Parameters:
K - the type of key
V - the type of the value
All Implemented Interfaces:
Serializable, Map.Entry<K,V>
Enclosing class:
AbstractMap<K,V>

public static class AbstractMap.SimpleEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
An Entry maintaining a key and a value. The value may be changed using the setValue method. Instances of this class are not associated with any map nor with any map's entry-set view.
API Note:
This class facilitates the process of building custom map implementations. For example, it may be convenient to return arrays of SimpleEntry instances in method Map.entrySet().toArray.
Since:
1.6
See Also: