java.util · java.base · since Java 1.2

Entry

declaration
public interface Map.Entry<K, V>

A single key/value pair — the element type of Map.entrySet() and the return of NavigableMap navigation. Comparator factories order entries by key or value.

Key methods

K getKey() / V getValue()The pair components.
V setValue(V value)Write through to the backing map (entrySet entries only).
static <K,V> Comparator<Map.Entry<K,V>> comparingByKey() / comparingByValue()Comparators for sorting entry streams.
static <K,V> Map.Entry<K,V> Map.entry(K, V)Immutable standalone entry — factory declared on Map (not Map.Entry).