de.jstacs.parameters
Class ParameterSetTagger.KeyEntryComparator<K extends Comparable<K>,V>

java.lang.Object
  extended by de.jstacs.parameters.ParameterSetTagger.KeyEntryComparator<K,V>
Type Parameters:
K - the type of the key
V - 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

Constructor Summary
ParameterSetTagger.KeyEntryComparator()
          Creates a Comparator that only compares the keys of Map.Entrys.
 
Method Summary
 int compare(Map.Entry<K,V> o1, Map.Entry<K,V> o2)
           
 
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
 

Constructor Detail

ParameterSetTagger.KeyEntryComparator

public ParameterSetTagger.KeyEntryComparator()
Creates a Comparator that only compares the keys of Map.Entrys.

Method Detail

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>>