org.apache.felix.scrplugin.tags
Class JavaClassDescriptionInheritanceComparator

java.lang.Object
  extended by org.apache.felix.scrplugin.tags.JavaClassDescriptionInheritanceComparator
All Implemented Interfaces:
java.util.Comparator

public class JavaClassDescriptionInheritanceComparator
extends java.lang.Object
implements java.util.Comparator

The JavaClassDescriptionInheritanceComparator orders JavaClassDescription objects by their inheritance:

  1. If the descriptors are the same, zero is returned
  2. If the first descriptor is an extension of the second, 1 is returned
  3. If the second descriptor is an extension of the first, -1 is returned
  4. 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.
  5. Finally, the natural order of the class names is returned


Constructor Summary
JavaClassDescriptionInheritanceComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object 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

JavaClassDescriptionInheritanceComparator

public JavaClassDescriptionInheritanceComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator