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.

    @FunctionalInterface
    protected static interface OptionParser.AvailableOption
    • Method Detail

      • requiresParameter

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

        default OptionParser.OptionCount 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​(java.lang.String parameter)
        Called once if the parameter is encountered, after basic validation.
        Parameters:
        parameter - The parameter if requiresParameter() is true, null otherwise.