Class GroupKey

  • All Implemented Interfaces:
    java.lang.Comparable<GroupKey>

    public final class GroupKey
    extends java.lang.Object
    implements java.lang.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 java.lang.String JAVA_GROUP
      Java group is handled a bit special: is always first to be scanned.
    • Constructor Summary

      Constructors 
      Constructor Description
      GroupKey​(java.lang.String group, int order)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
      boolean equals​(java.lang.Object o)  
      java.lang.String getGroup()
      Returns the group this key belongs to, never null.
      int getOrder()
      Returns the order within same group of this key.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • JAVA_GROUP

        public static final java.lang.String JAVA_GROUP
        Java group is handled a bit special: is always first to be scanned.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GroupKey

        public GroupKey​(java.lang.String group,
                        int order)
    • Method Detail

      • getGroup

        public java.lang.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.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 java.lang.Comparable<GroupKey>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object