org.apache.felix.scrplugin.tags
Class JavaClassDescriptionInheritanceComparator
java.lang.Object
org.apache.felix.scrplugin.tags.JavaClassDescriptionInheritanceComparator
- All Implemented Interfaces:
- Comparator<JavaClassDescription>
public class JavaClassDescriptionInheritanceComparator
- extends Object
- implements Comparator<JavaClassDescription>
The JavaClassDescriptionInheritanceComparator
orders
JavaClassDescription
objects by their inheritance:
- If the descriptors are the same, zero is returned
- If the first descriptor is an extension of the second, 1 is returned
- If the second descriptor is an extension of the first, -1 is returned
- Otherwise if the first descriptor is nested deeper in the hierarchy 1 is
returned, else if the second descriptor is nested deeper in the hierarchy -1
is returned.
- Finally, the natural order of the class names is returned
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaClassDescriptionInheritanceComparator
public JavaClassDescriptionInheritanceComparator()
compare
public int compare(JavaClassDescription cd1,
JavaClassDescription cd2)
- Specified by:
compare
in interface Comparator<JavaClassDescription>
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.