Package tigase.util.ui.console

## Class CommandlineParameter.Builder

- java.lang.Object
- - tigase.util.ui.console.CommandlineParameter.Builder

- Enclosing class:
    CommandlineParameter

      public static class CommandlineParameter.Builder
      extends java.lang.Object

  Creates a `CommandlineParameter` builder

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder​(java.lang.String singleLetter, java.lang.String fullName)` | Constructs a `CommandlineParameter` builder.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CommandlineParameter` | `build()` | Creates a concrete `CommandlineParameter` from particular builder
    `CommandlineParameter.Builder` | `defaultValue​(java.lang.String defaultValue)` | Sets default value for the parameter option
    `CommandlineParameter.Builder` | `description​(java.lang.String description)` | Sets the description for the parameter option
    `CommandlineParameter.Builder` | `options​(java.lang.String... options)` | Sets possible options for the parameter option
    `CommandlineParameter.Builder` | `requireArguments​(boolean required)` | Sets whether particular parameter option requires arguments
    `CommandlineParameter.Builder` | `required​(boolean required)` | Sets whether particular parameter option is required - if yes then it's mandatory to set it's value or provide default.
    `CommandlineParameter.Builder` | `secret()` | Sets the parameter option as secret which influences how it will be obtained in interactive mode (won't be printed, useful for passwords)
    `CommandlineParameter.Builder` | `type​(java.lang.Class type)` |
    `CommandlineParameter.Builder` | `valueDependentParametersProvider​(java.util.function.Function<java.lang.String,​java.util.List<CommandlineParameter>> provider)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder​(java.lang.String singleLetter,
                         java.lang.String fullName)

      Constructs a `CommandlineParameter` builder. It takes as parameters both "single-letter" and "full-name" of which one is mandatory
      Parameters:
        `singleLetter` - single letter identification of the option
        `fullName` - full named identification of the option

  - ### Method Detail

    - #### build

          public CommandlineParameter build()

      Creates a concrete `CommandlineParameter` from particular builder
      Returns:
        constructed `CommandlineParameter`

    - #### defaultValue

          public CommandlineParameter.Builder defaultValue​(java.lang.String defaultValue)

      Sets default value for the parameter option
      Parameters:
        `defaultValue` - default value to be set
      Returns:
        current Builder object

    - #### description

          public CommandlineParameter.Builder description​(java.lang.String description)

      Sets the description for the parameter option
      Parameters:
        `description` - description to be set
      Returns:
        current Builder object

    - #### options

          public CommandlineParameter.Builder options​(java.lang.String... options)

      Sets possible options for the parameter option
      Parameters:
        `options` - array of possible options
      Returns:
        current Builder object

    - #### requireArguments

          public CommandlineParameter.Builder requireArguments​(boolean required)

      Sets whether particular parameter option requires arguments
      Parameters:
        `required` - whether the option needs parameter
      Returns:
        current Builder object

    - #### required

          public CommandlineParameter.Builder required​(boolean required)

      Sets whether particular parameter option is required - if yes then it's mandatory to set it's value or provide default.
      Parameters:
        `required` - whether the option is required
      Returns:
        current Builder object

    - #### secret

          public CommandlineParameter.Builder secret()

      Sets the parameter option as secret which influences how it will be obtained in interactive mode (won't be printed, useful for passwords)
      Returns:
        current Builder object

    - #### type

          public CommandlineParameter.Builder type​(java.lang.Class type)

    - #### valueDependentParametersProvider

          public CommandlineParameter.Builder valueDependentParametersProvider​(java.util.function.Function<java.lang.String,​java.util.List<CommandlineParameter>> provider)