Package generic

Class DominantPair<K,V>

java.lang.Object
generic.stl.Pair<K,V>
generic.DominantPair<K,V>
Type Parameters:
K - the key type
V - 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 Details

    • DominantPair

      public DominantPair(K key, V value)
  • Method Details