Class KeyValue<K extends java.lang.Comparable<K>,​V>

  • Type Parameters:
    K - The key type
    V - The value type
    All Implemented Interfaces:
    java.lang.Comparable<KeyValue<K,​V>>

    public class KeyValue<K extends java.lang.Comparable<K>,​V>
    extends java.lang.Object
    implements java.lang.Comparable<KeyValue<K,​V>>
    A key/value object
    Author:
    gianpiero.diblasi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      K key  
      V value  
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyValue​(K key, V value)
      Creates the object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(KeyValue<K,​V> other)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        public K extends java.lang.Comparable<K> key
      • value

        public V value
    • Constructor Detail

      • KeyValue

        public KeyValue​(K key,
                        V value)
        Creates the object
        Parameters:
        key - The key
        value - The value
    • Method Detail

      • compareTo

        public int compareTo​(KeyValue<K,​V> other)
        Specified by:
        compareTo in interface java.lang.Comparable<K extends java.lang.Comparable<K>>