Class KeyValue<A,​B>

  • All Implemented Interfaces:
    java.lang.Comparable<KeyValue<A,​B>>

    public class KeyValue<A,​B>
    extends java.lang.Object
    implements java.lang.Comparable<KeyValue<A,​B>>
    A "key = value" pair
    Author:
    pablocingolani
    • Field Detail

      • key

        public final A key
      • value

        public final B value
    • Constructor Detail

      • KeyValue

        public KeyValue​(A key,
                        B value)
    • Method Detail

      • compareTo

        public int compareTo​(KeyValue<A,​B> o)
        Specified by:
        compareTo in interface java.lang.Comparable<A>
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getKey

        public A getKey()
      • getValue

        public B getValue()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object