org.ojalgo.type.keyvalue
Class MapEntry<K extends Comparable<K>,V>
java.lang.Object
org.ojalgo.type.keyvalue.MapEntry<K,V>
- All Implemented Interfaces:
- Comparable<KeyValue<K,?>>, Map.Entry<K,V>, KeyValue<K,V>
public final class MapEntry<K extends Comparable<K>,V>
- extends Object
- implements Map.Entry<K,V>, KeyValue<K,V>
This class is primarily an implementation of Map.Entry,
but also implemnts KeyValue.
- Author:
- apete
MapEntry
public MapEntry(K aKey,
V aValue)
MapEntry
public MapEntry(Map.Entry<K,V> anEntry)
MapEntry
public MapEntry(Map<K,V> aMap,
K aKey)
compareTo
public int compareTo(KeyValue<K,?> aReference)
- Specified by:
compareTo in interface Comparable<KeyValue<K extends Comparable<K>,?>>
equals
public boolean equals(Object obj)
- Specified by:
equals in interface Map.Entry<K extends Comparable<K>,V>- Overrides:
equals in class Object
getKey
public K getKey()
- Specified by:
getKey in interface Map.Entry<K extends Comparable<K>,V>- Specified by:
getKey in interface KeyValue<K extends Comparable<K>,V>
getValue
public V getValue()
- Specified by:
getValue in interface Map.Entry<K extends Comparable<K>,V>- Specified by:
getValue in interface KeyValue<K extends Comparable<K>,V>
hashCode
public int hashCode()
- Specified by:
hashCode in interface Map.Entry<K extends Comparable<K>,V>- Overrides:
hashCode in class Object
setValue
public V setValue(V aValue)
- Specified by:
setValue in interface Map.Entry<K extends Comparable<K>,V>
toString
public String toString()
- Overrides:
toString in class Object