Class CommandLine.Help.SortByShortestOptionNameAlphabetically

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.reflect.Field>
    Direct Known Subclasses:
    CommandLine.Help.SortByOptionArityAndNameAlphabetically
    Enclosing class:
    CommandLine.Help

    static class CommandLine.Help.SortByShortestOptionNameAlphabetically
    extends java.lang.Object
    implements java.util.Comparator<java.lang.reflect.Field>
    Sorts Option instances by their name in case-insensitive alphabetic order. If an Option has multiple names, the shortest name is used for the sorting. Help options follow non-help options.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.reflect.Field f1, java.lang.reflect.Field f2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • SortByShortestOptionNameAlphabetically

        SortByShortestOptionNameAlphabetically()
    • Method Detail

      • compare

        public int compare​(java.lang.reflect.Field f1,
                           java.lang.reflect.Field f2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.reflect.Field>