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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Java group is handled a bit special: is always first to be scanned.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GroupKey(String group, int order)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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
    boolean
     
    Returns the group this key belongs to, never null.
    int
    Returns the order within same group of this key.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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:
  • 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