Class ImmutableMap.ImmutableEntry<K,​V>

  • Type Parameters:
    K - key
    V - value
    Enclosing interface:
    ImmutableMap<K,​V>

    public static class ImmutableMap.ImmutableEntry<K,​V>
    extends Object
    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 ImmutableMap.ImmutableEntry 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.
    • Constructor Detail

      • ImmutableEntry

        public ImmutableEntry​(Map.Entry<K,​V> wrappedEntry)
        Parameters:
        wrappedEntry - Entry<K,V>; the wrapped entry