Interface OptionParser.AvailableOption

Enclosing class:
OptionParser
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

  • Method Summary

    Modifier and Type
    Method
    Description
    Determines how often this option may / must be specified on the command line.
    default boolean
    Determines if this option requires a parameter.
    void
    runFor(String parameter)
    Called once if the parameter is encountered, after basic validation.
  • Method Details

    • requiresParameter

      default boolean requiresParameter()
      Determines if this option requires a parameter.
      Returns:
      true if this option requires a parameter (false by default)
    • getRequiredCount

      Determines how often this option may / must be specified on the command line.
      Returns:
      how often this option may / must be specified on the command line
    • runFor

      void runFor(String parameter)
      Called once if the parameter is encountered, after basic validation.
      Parameters:
      parameter - The parameter if requiresParameter() is true, null otherwise.