Class ArgumentOptions


  • public class ArgumentOptions
    extends java.lang.Object
    Options for configuring the argument parser.
    • Constructor Detail

      • ArgumentOptions

        public ArgumentOptions​(STTY tty)
    • Method Detail

      • withDefaultsShown

        public ArgumentOptions withDefaultsShown​(boolean show)
        Set whether the default values should be printed in usage.
        Parameters:
        show - If the default values should be printed.
        Returns:
        The Argument options.
      • isDefaultsShown

        public boolean isDefaultsShown()
        Returns:
        True if the default values should be printed in usage.
      • withUsageWidth

        public ArgumentOptions withUsageWidth​(int usageWidth)
        Set the number of columns to be used for usage printing.
        Parameters:
        usageWidth - The number of columns.
        Returns:
        The Argument options.
      • withMaxUsageWidth

        public ArgumentOptions withMaxUsageWidth​(int maxWidth)
        Set the maximum usage width. The width is set as wide as possible based on the terminal column count, but maximum the maxWidth.
        Parameters:
        maxWidth - The maximum width.
        Returns:
        The Argument options.
      • getUsageWidth

        public int getUsageWidth()
        Returns:
        Number of columns to be used for usage printing.
      • getOptionComparator

        public java.util.Comparator<BaseOption> getOptionComparator()
      • isSubCommandsShown

        public boolean isSubCommandsShown()
      • withSubCommandsShown

        public ArgumentOptions withSubCommandsShown​(boolean subCommandsShown)
      • getSubCommandsString

        public java.lang.String getSubCommandsString()
      • withSubCommandsString

        public ArgumentOptions withSubCommandsString​(java.lang.String subCommandsString)