java.lang.Object
eu.svjatoslav.commons.cli_helper.parameter_parser.Option<List<String>,StringOptions>
eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions

public class StringOptions extends Option<List<String>,StringOptions>
Represents a command-line option that accepts one or more string parameters.
  • Constructor Details

    • StringOptions

      public StringOptions(String description)
      Creates a StringOptions object, requiring one or more string parameters.
      Parameters:
      description - a brief description of what these strings represent.
  • Method Details

    • describeFormat

      public String describeFormat()
      Description copied from class: Option
      Describes the kind or format of the expected parameter(s), e.g. "File", "Integer", etc.
      Specified by:
      describeFormat in class Option<List<String>,StringOptions>
      Returns:
      a short string describing the parameter format
    • getValue

      public List<String> getValue()
      Returns the list of strings provided by the user.
      Specified by:
      getValue in class Option<List<String>,StringOptions>
      Returns:
      the parsed value as the generic type T.
    • isValid

      public boolean isValid(String value)
      Always returns true since any string is valid for this option.
      Specified by:
      isValid in class Option<List<String>,StringOptions>
      Parameters:
      value - the parameter string to test
      Returns:
      true if valid; false otherwise