Package org.apache.commons.cli
Class HelpFormatter.OptionComparator
java.lang.Object
org.apache.commons.cli.HelpFormatter.OptionComparator
- All Implemented Interfaces:
Serializable,Comparator<Option>
- Enclosing class:
- HelpFormatter
private static class HelpFormatter.OptionComparator
extends Object
implements Comparator<Option>, Serializable
This class implements the
Comparator interface for comparing Options.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longThe serial version UID. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThe serial version UID.- See Also:
-
-
Constructor Details
-
OptionComparator
private OptionComparator()
-
-
Method Details
-
compare
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:
comparein interfaceComparator<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.
-