de.caff.util.args

## Class AbstractBasicMultipleArgument

- java.lang.Object
- - de.caff.util.args.AbstractBasicArgument
  - - de.caff.util.args.AbstractBasicMultipleArgument

- All Implemented Interfaces:
    Argument, SwitchOrArgument
  Direct Known Subclasses:
    MultipleArgument

      public abstract class AbstractBasicMultipleArgument
      extends AbstractBasicArgument

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `maxCount`
    `protected int` | `minCount`

    - ### Fields inherited from interface de.caff.util.args.Argument

      `ARGUMENT_FORMAT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractBasicMultipleArgument(java.lang.String name, java.lang.String description, int minCount)`
    `protected` | `AbstractBasicMultipleArgument(java.lang.String name, java.lang.String description, int minCount, int maxCount)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaximalCount()` Get the maximum number of times this argument might appear on the command line.
    `int` | `getMinimalCount()` Get the minimum number of times this argument might appear on the command line.
    `boolean` | `isVarLength()` Does this argument or switch have a variable length?

    - ### Methods inherited from class de.caff.util.args.AbstractBasicArgument

      `getAppearance, getDescription`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `isOptional, isSwitch`

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

      `consumeArgument`

- - ### Field Detail

    - #### minCount

          protected final int minCount

    - #### maxCount

          protected final int maxCount

  - ### Constructor Detail

    - #### AbstractBasicMultipleArgument

          protected AbstractBasicMultipleArgument(java.lang.String name,
                                                  java.lang.String description,
                                                  int minCount,
                                                  int maxCount)

    - #### AbstractBasicMultipleArgument

          protected AbstractBasicMultipleArgument(java.lang.String name,
                                                  java.lang.String description,
                                                  int minCount)

  - ### Method Detail

    - #### isVarLength

          public boolean isVarLength()

      Description copied from interface: `SwitchOrArgument`
      Does this argument or switch have a variable length? This is only allowed for the last argument/switch in the command line.
      Returns:
        `true`: this argument or switch consumes the remaining items in the command line
        `false`: this argument or switch just consumes 1 item (for arguments) or 2 items (for switches) from the command line

    - #### getMinimalCount

          public int getMinimalCount()

      Description copied from interface: `Argument`
      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

          public int getMaximalCount()

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