org.ojalgo.type.keyvalue
Class ComparableToObject<K extends Comparable<K>,V>

java.lang.Object
  extended by org.ojalgo.type.keyvalue.ComparableToObject<K,V>
All Implemented Interfaces:
Comparable<KeyValue<K,?>>, KeyValue<K,V>

public final class ComparableToObject<K extends Comparable<K>,V>
extends Object
implements KeyValue<K,V>


Field Summary
 K key
           
 V value
           
 
Constructor Summary
ComparableToObject(K aKey, V avalue)
           
 
Method Summary
 int compareTo(KeyValue<K,?> aReference)
           
 boolean equals(Object obj)
           
 K getKey()
           
 V getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

public final K extends Comparable<K> key

value

public final V value
Constructor Detail

ComparableToObject

public ComparableToObject(K aKey,
                          V avalue)
Method Detail

compareTo

public int compareTo(KeyValue<K,?> aReference)
Specified by:
compareTo in interface Comparable<KeyValue<K extends Comparable<K>,?>>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getKey

public K getKey()
Specified by:
getKey in interface KeyValue<K extends Comparable<K>,V>

getValue

public V getValue()
Specified by:
getValue in interface KeyValue<K extends Comparable<K>,V>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object