
FIRST - first typeSECOND - second typepublic static class PairUtil.CompareByFirst<FIRST,SECOND> extends Object implements Comparator<Pair<? extends FIRST,? extends SECOND>>
| Modifier and Type | Field and Description | 
|---|---|
| private Comparator<? super FIRST> | comparatorA comparator for type P. | 
| Constructor and Description | 
|---|
| PairUtil.CompareByFirst(Comparator<? super FIRST> comparator)Provides a comparator for an  Pairbased on the given Comparator
 for typeP. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compare(Pair<? extends FIRST,? extends SECOND> o1,
       Pair<? extends FIRST,? extends SECOND> o2)To Objects of type  Pairare compared based on the comparison of
 their property using the currentPairUtil.comparator(). | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalsprivate Comparator<? super FIRST> comparator
public PairUtil.CompareByFirst(Comparator<? super FIRST> comparator)
Pair based on the given Comparator
 for type P.comparator - a Comparator for type P to base the
        comparison of an Pair onpublic int compare(Pair<? extends FIRST,? extends SECOND> o1, Pair<? extends FIRST,? extends SECOND> o2)
Pair are compared based on the comparison of
 their property using the current PairUtil.comparator().compare in interface Comparator<Pair<? extends FIRST,? extends SECOND>>o1 - First objecto2 - Second objectComparator.compare(T, T)