de.caff.util.args

## Interface Argument

- All Superinterfaces:
    SwitchOrArgument
  All Known Implementing Classes:
    AbstractBasicArgument, AbstractBasicMultipleArgument, MultipleArgument, SingleArgument

      public interface Argument
      extends SwitchOrArgument

  A command line argument which is not a switch.
  Since:
    January 27, 2019
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ARGUMENT_FORMAT` Format for arguments.

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default int` | `getMaximalCount()` Get the maximum number of times this argument might appear on the command line.
    `default int` | `getMinimalCount()` Get the minimum number of times this argument might appear on the command line.
    `default boolean` | `isOptional()` Default implementation which used the `minimal count` to decide whether this is optional.
    `default boolean` | `isSwitch()` Default implementation which returns `false`.

    - ### Methods inherited from interface de.caff.util.args.SwitchOrArgument

      `consumeArgument, getAppearance, getDescription, isVarLength`

- - ### Field Detail

    - #### ARGUMENT_FORMAT

          static final java.lang.String ARGUMENT_FORMAT

      Format for arguments.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getMinimalCount

          default int getMinimalCount()

      Get the minimum number of times this argument might appear on the command line. The default implementation returns `1`.
      Returns:
        minimum number of appearances of this argument

    - #### getMaximalCount

          default int getMaximalCount()

      Get the maximum number of times this argument might appear on the command line. The default implementation returns the value of `getMinimalCount()`
      Returns:
        maximum number of appearances of this argument, use `Integer.MAX_VALUE` for infinity

    - #### isSwitch

          default boolean isSwitch()

      Default implementation which returns `false`.
      Specified by:
        `isSwitch` in interface `SwitchOrArgument`
      Returns:
        `false`

    - #### isOptional

          default boolean isOptional()

      Default implementation which used the `minimal count` to decide whether this is optional.
      Specified by:
        `isOptional` in interface `SwitchOrArgument`
      Returns:
        `true` when minimal count is `0`,
        `false` otherwise