edu.berkeley.nlp.lm.collections
Class Counter.EntryValueComparator
java.lang.Object
edu.berkeley.nlp.lm.collections.Counter.EntryValueComparator
- All Implemented Interfaces:
- Comparator<Map.Entry<E,Double>>
- Enclosing class:
- Counter<E>
public class Counter.EntryValueComparator
- extends Object
- implements Comparator<Map.Entry<E,Double>>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Counter.EntryValueComparator
public Counter.EntryValueComparator(boolean descending)
- Parameters:
descending
-
compare
public int compare(Map.Entry<E,Double> e1,
Map.Entry<E,Double> e2)
- Specified by:
compare
in interface Comparator<Map.Entry<E,Double>>