Class Utils.DocComparator<T extends Doc>

java.lang.Object
gw.gosudoc.com.sun.tools.doclets.internal.toolkit.util.Utils.DocComparator<T>
Type Parameters:
T - a Doc entity
All Implemented Interfaces:
Comparator<Doc>
Enclosing class:
Utils

abstract static class Utils.DocComparator<T extends Doc> extends Object implements Comparator<Doc>
A general purpose comparator to sort Doc entities, basically provides the building blocks for creating specific comparators for an use-case.
  • Constructor Details

    • DocComparator

      DocComparator()
  • Method Details

    • hasParameters

      boolean hasParameters(Doc d)
    • getDocKind

    • compareDocKinds

      protected int compareDocKinds(Doc d1, Doc d2)
      Compares two Doc entities' kinds, and these are ordered as defined in the DocKind enumeration.
      Parameters:
      d1 - the first Doc object
      d2 - the second Doc object
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
    • compareParameters

      protected int compareParameters(boolean caseSensitive, Parameter[] params1, Parameter[] params2)
      Compares arrays of parameters as a string representation of their types.
      Parameters:
      ignoreCase - specifies case sensitive or insensitive comparison.
      params1 - the first parameter array.
      params2 - the first parameter array.
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
    • getParametersAsString

      protected String getParametersAsString(Parameter[] params)
    • compareNames

      protected int compareNames(Doc d1, Doc d2)
      Compares two Doc entities typically the simple name of a method, field, constructor etc.
      Parameters:
      d1 - the first Doc.
      d2 - the second Doc.
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
    • compareFullyQualifiedNames

      protected int compareFullyQualifiedNames(Doc d1, Doc d2)
      Compares the fully qualified names of the entities
      Parameters:
      d1 - the first entity
      d2 - the second entity
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.