jml.utils
Class Utility.keyAscendComparator<K extends java.lang.Comparable<K>>

java.lang.Object
  extended by jml.utils.Utility.keyAscendComparator<K>
Type Parameters:
K - Class type to be specified by declaration.
All Implemented Interfaces:
java.util.Comparator<K>
Enclosing class:
Utility

public static class Utility.keyAscendComparator<K extends java.lang.Comparable<K>>
extends java.lang.Object
implements java.util.Comparator<K>

Generic comparator for TreeMap to sort the keys in a increasing order.

Author:
Mingjie Qian

Constructor Summary
Utility.keyAscendComparator()
           
 
Method Summary
 int compare(K k1, K k2)
           
 
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

Utility.keyAscendComparator

public Utility.keyAscendComparator()
Method Detail

compare

public int compare(K k1,
                   K k2)
Specified by:
compare in interface java.util.Comparator<K extends java.lang.Comparable<K>>