Class KeyValue<K,​V>

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

    public class KeyValue<K,​V>
    extends Object
    Object pairs for a bunch of data structures.
    Author:
    Matthew Tropiano
    • Field Detail

      • key

        protected K key
        The key object in the pair.
      • value

        protected V value
        The value object in the pair.
    • Constructor Detail

      • KeyValue

        public KeyValue​(K key,
                        V value)
        Creates a new object pair.
        Parameters:
        key - the key object.
        value - the value object.
    • Method Detail

      • getKey

        public K getKey()
        Returns:
        the key.
      • getValue

        public V getValue()
        Returns:
        the value.
      • setValue

        public void setValue​(V value)
        Sets the value to a new value.
        Parameters:
        value - the value of the new value.