Class GroupKey

java.lang.Object
org.apache.maven.tools.plugin.extractor.GroupKey
All Implemented Interfaces:
Comparable<GroupKey>

public final class GroupKey extends Object implements Comparable<GroupKey>
Group key: defines "grouping" for descriptor (based on source of extraction) and rank within group.
Since:
TBD
  • Field Details

    • JAVA_GROUP

      public static final String JAVA_GROUP
      Java group is handled a bit special: is always first to be scanned.
      See Also:
    • group

      private final String group
    • order

      private final int order
  • Constructor Details

    • GroupKey

      public GroupKey(String group, int order)
  • Method Details

    • getGroup

      public String getGroup()
      Returns the group this key belongs to, never null.
    • getOrder

      public int getOrder()
      Returns the order within same group of this key. Returns int should be used for ordering only.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(GroupKey o)
      Compares by group then by order, with special case of JAVA_GROUP group:
      • First, group is considered, if equals to JAVA_GROUP, is always first, other groups are in natural order (string)
      • within same named groups, order is defined by order
      Specified by:
      compareTo in interface Comparable<GroupKey>
    • toString

      public String toString()
      Overrides:
      toString in class Object