java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.util.Comparators

public class Comparators extends Object
A collection of Comparator factory methods.
  • Methodendetails

    • makeModuleComparator

      Comparator for ModuleElements, simply compares the fully qualified names
      Gibt zurück:
      a Comparator
    • makeAllClassesComparator

      Returns a Comparator for all classes, compares the simple names of TypeElement, if equal then the fully qualified names, and if equal again the names of the enclosing modules.
      Gibt zurück:
      Comparator
    • makePackageComparator

      Returns a Comparator for packages, by comparing the fully qualified names, and if those are equal the names of the enclosing modules.
      Gibt zurück:
      a Comparator
    • makeSummaryComparator

      Returns a Comparator for items listed on summary list pages (like deprecated or preview summary pages), by comparing the fully qualified names, and if those are equal the names of the enclosing modules.
      Gibt zurück:
      a Comparator
    • makeSerialFieldTreeComparator

      Returns a Comparator for SerialFieldTree.
      Gibt zurück:
      a Comparator
    • makeGeneralPurposeComparator

      Returns a general purpose comparator.
      Gibt zurück:
      a Comparator
    • makeOverrideUseComparator

      Returns a Comparator for overrides and implements, used primarily on methods, compares the name first, then compares the simple names of the enclosing TypeElement and the fully qualified name of the enclosing TypeElement.
      Gibt zurück:
      a Comparator
    • makeIndexElementComparator

      Returns an Element Comparator for index file presentations, and are sorted as follows.

      If comparing modules and/or packages then simply compare the qualified names, if comparing a module or a package with a type/member then compare the FullyQualifiedName of the module or a package with the SimpleName of the entity, otherwise:

      1. compare the ElementKind ex: Module, Package, Interface etc. 2a. if equal and if the type is of ExecutableElement(Constructor, Methods), a case insensitive comparison of parameter the type signatures 2b. if equal, case sensitive comparison of the type signatures
      2. if equal, compare the FQNs of the entities
      3. finally, if equal, compare the names of the enclosing modules
      Gibt zurück:
      an element comparator for index file use
    • getIndexElementKey

      public String getIndexElementKey(Element element)
      Gibt the element's primary key for use in the index comparator zurück.

      This method can be used by other comparators which need to produce results that are consistent with the index comparator.

      Parameter:
      element - an element
      Gibt zurück:
      the element's primary key for use in the index comparator
    • makeTypeMirrorClassUseComparator

      Returns a comparator that compares the fully qualified names of two type mirrors.
      Gibt zurück:
      the comparator
    • makeTypeMirrorIndexUseComparator

      Returns a comparator that compares the simple names of two type mirrors, or the fully qualified names if the simple names are equal.
      Gibt zurück:
      the comparator
    • makeClassUseComparator

      Comparator for ClassUse presentations, and sorts as follows:

      1. member names
      2. then fully qualified member names
      3. then parameter types if applicable
      4. the element kinds ie. package, class, interface etc.
      5. finally the name of the enclosing modules
      Gibt zurück:
      a comparator to sort classes and members for class use