pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util
Class ClassComperator

java.lang.Object
  extended by org.torweg.pulse.util.ClassComperator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<java.lang.Class<? extends java.lang.Object>>

public final class ClassComperator
extends java.lang.Object
implements java.util.Comparator<java.lang.Class<? extends java.lang.Object>>, java.io.Serializable

a Comparator which compares classes by their full qualified name.

Version:
$Revision: 1405 $
Author:
Thomas Weber
See Also:
Serialized Form

Constructor Summary
ClassComperator()
           
 
Method Summary
 int compare(java.lang.Class<? extends java.lang.Object> c1, java.lang.Class<? extends java.lang.Object> c2)
          compares the two classes by their full qualified class name.
 
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

ClassComperator

public ClassComperator()
Method Detail

compare

public int compare(java.lang.Class<? extends java.lang.Object> c1,
                   java.lang.Class<? extends java.lang.Object> c2)
compares the two classes by their full qualified class name.

Specified by:
compare in interface java.util.Comparator<java.lang.Class<? extends java.lang.Object>>
Parameters:
c1 - the first class of the comparison
c2 - the second class of the comparison
Returns:
c1.getCanonicalName().compareTo(c2.getCanonicalName())