Package generic
Class DominantPair<K,V>
- java.lang.Object
-
- generic.stl.Pair<K,V>
-
- generic.DominantPair<K,V>
-
- Type Parameters:
K
- the key typeV
- the value type
public class DominantPair<K,V> extends Pair<K,V>
DominantPair is a pair where the key is responsible for equality and hashCode (and the value of the pair doesn't matter at all). This is useful when you need the pair itself to function as a key in a Map or value in a Set.
-
-
Constructor Summary
Constructors Constructor Description DominantPair(K key, V value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-