Class HelpFormatter.OptionComparator

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<Option>
    Enclosing class:
    HelpFormatter

    private static class HelpFormatter.OptionComparator
    extends java.lang.Object
    implements java.util.Comparator<Option>, java.io.Serializable
    This class implements the Comparator interface for comparing Options.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID
      The serial version UID.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OptionComparator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(Option opt1, Option opt2)
      Compares its two arguments for order.
      • 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
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The serial version UID.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OptionComparator

        private OptionComparator()
    • Method Detail

      • compare

        public int compare​(Option opt1,
                           Option opt2)
        Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
        Specified by:
        compare in interface java.util.Comparator<Option>
        Parameters:
        opt1 - The first Option to be compared.
        opt2 - The second Option to be compared.
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.