Package edu.stanford.nlp.util
Class Pair.ByFirstPairComparator<T1,T2>
- java.lang.Object
-
- edu.stanford.nlp.util.Pair.ByFirstPairComparator<T1,T2>
-
- All Implemented Interfaces:
Comparator<Pair<T1,T2>>
public static class Pair.ByFirstPairComparator<T1,T2> extends Object implements Comparator<Pair<T1,T2>>
Compares aPairto anotherPairaccording to the first object of the pair only This function will work providing the first element of thePairis comparable, otherwise will throw aClassCastException.- Author:
- jonathanberant
-
-
Constructor Summary
Constructors Constructor Description ByFirstPairComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Pair<T1,T2> pair1, Pair<T1,T2> pair2)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-