edu.stanford.nlp.util
Class Pair.BySecondReversePairComparator<T1,T2>
java.lang.Object
edu.stanford.nlp.util.Pair.BySecondReversePairComparator<T1,T2>
- Type Parameters:
T1 - T2 -
- All Implemented Interfaces:
- java.util.Comparator<Pair<T1,T2>>
- Enclosing class:
- Pair<T1,T2>
public static class Pair.BySecondReversePairComparator<T1,T2>
- extends java.lang.Object
- implements java.util.Comparator<Pair<T1,T2>>
Compares a Pair to another Pair according to the second object of the pair only in decreasing order
This function will work providing
the first element of the Pair is comparable, otherwise will throw a
ClassCastException
- Author:
- jonathanberant
| 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 |
Pair.BySecondReversePairComparator
public Pair.BySecondReversePairComparator()
compare
public int compare(Pair<T1,T2> pair1,
Pair<T1,T2> pair2)
- Specified by:
compare in interface java.util.Comparator<Pair<T1,T2>>
Stanford NLP Group