public interface KeyValue<K,V> extends Comparable<KeyValue<K,?>>
A key-value pair or key-to-value map. The intention is that Object.equals(Object), Object.hashCode() and Comparable.compareTo(Object) operates on the key part only.
This is NOT compatible with how for instance Map.Entry implements those methods.
Further it is indented that implementations should be immutable.
Modifier and Type | Method and Description |
---|---|
K |
getKey() |
V |
getValue() |
compareTo
Copyright © 2019 Optimatika. All rights reserved.