Class MapEntry<K,​V>

java.lang.Object
com.exonum.binding.common.collect.MapEntry<K,​V>
Type Parameters:
K - the key type
V - the value type

public abstract class MapEntry<K,​V>
extends java.lang.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 Summary

    Constructors 
    Constructor Description
    MapEntry()  
  • Method Summary

    Modifier and Type Method Description
    abstract K getKey()
    Returns the key corresponding to this entry.
    abstract V getValue()
    Returns the value corresponding to this entry.
    static <K,​ V> MapEntry<K,​V> valueOf​(K key, V value)
    Creates a new MapEntry from the given key and value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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.