org.squirrelframework.foundation.util
Class ClassComparator<T>
java.lang.Object
org.squirrelframework.foundation.util.ClassComparator<T>
- Type Parameters:
T - type of object to compare
- All Implemented Interfaces:
- Serializable, Comparator<T>
public class ClassComparator<T>
- extends Object
- implements Comparator<T>, Serializable
Orders classes by assignability, with closest types ordered first.
- Author:
- Henry.He
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassComparator
public ClassComparator()
compare
public int compare(T o1,
T o2)
- Specified by:
compare in interface Comparator<T>
isComparable
public boolean isComparable(Class<?> c1,
Class<?> c2)
Copyright © 2013-2014. All Rights Reserved.