Class MapEntry<K,​V>

  • Type Parameters:
    K - the key type
    V - the value type

    public abstract class MapEntry<K,​V>
    extends Object
    A map entry: a key-value pair. This entry does not permit null keys and values.

    A map entry contains a copy of the data in the corresponding map index. Unlike Map.Entry, it does not reflect the changes made to the map since this entry had been created.

    • Constructor Detail

      • MapEntry

        public MapEntry()
    • Method Detail

      • valueOf

        public static <K,​V> MapEntry<K,​V> valueOf​(K key,
                                                              V value)
        Creates a new MapEntry from the given key and value.
      • getKey

        public abstract K getKey()
        Returns the key corresponding to this entry.
      • getValue

        public abstract V getValue()
        Returns the value corresponding to this entry.