de.jstacs.parameters
Class ParameterSetTagger.RankEntryComparator<K,V>
java.lang.Object
de.jstacs.parameters.ParameterSetTagger.RankEntryComparator<K,V>
- Type Parameters:
K
- the type of the keyV
- the type of the value
- All Implemented Interfaces:
- Comparator<Map.Entry<K,ComparableElement<V,Integer>>>
- Enclosing class:
- ParameterSetTagger
public class ParameterSetTagger.RankEntryComparator<K,V>
- extends Object
- implements Comparator<Map.Entry<K,ComparableElement<V,Integer>>>
This class implements a comparator on Map.Entry
where value is a ComparableElement
with weight Integer
.
This class allows, for instance, to sort the Parameter
in a ParameterSetTagger
as given in the constructor.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParameterSetTagger.RankEntryComparator
public ParameterSetTagger.RankEntryComparator()
- Creates a
Comparator
that only compares the ranks of Map.Entry
s where the rank is determined by the ParameterSet.parameters
.
compare
public int compare(Map.Entry<K,ComparableElement<V,Integer>> o1,
Map.Entry<K,ComparableElement<V,Integer>> o2)
- Specified by:
compare
in interface Comparator<Map.Entry<K,ComparableElement<V,Integer>>>