de.jstacs.parameters
Class ParameterSetTagger.KeyEntryComparator<K extends Comparable<K>,V>
java.lang.Object
de.jstacs.parameters.ParameterSetTagger.KeyEntryComparator<K,V>
- Type Parameters:
K
- the type of the keyV
- the type of the value
- All Implemented Interfaces:
- Comparator<Map.Entry<K,V>>
- Enclosing class:
- ParameterSetTagger
public static class ParameterSetTagger.KeyEntryComparator<K extends Comparable<K>,V>
- extends Object
- implements Comparator<Map.Entry<K,V>>
This class implements a comparator on Map.Entry
that sorts by the key of the Map.Entry
.
This class allows, for instance, to sort the Parameter
in a ParameterSetTagger
by their tags.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParameterSetTagger.KeyEntryComparator
public ParameterSetTagger.KeyEntryComparator()
- Creates a
Comparator
that only compares the keys of Map.Entry
s.
compare
public int compare(Map.Entry<K,V> o1,
Map.Entry<K,V> o2)
- Specified by:
compare
in interface Comparator<Map.Entry<K extends Comparable<K>,V>>