Class CommandlineParameter.Builder

    • 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

      • 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