Map.Entry (Java Platform SE 8 ) (original) (raw)


public static interface Map.Entry<K,V>
A map entry (key-value pair). The
Map.entrySet
method returns a collection-view of the map, whose elements are of this class. The_only_ way to obtain a reference to a map entry is from the iterator of this collection-view. These
Map.Entry
objects are valid only for the duration of the iteration; more formally, the behavior of a map entry is undefined if the backing map has been modified after the entry was returned by the iterator, except through the
setValue
operation on the map entry.
Since:
1.2
See Also:
Map.entrySet()

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.