CommandLine.ParseResult.MatchedGroup (picocli 4.0.0-alpha-1 API)
Date: 2019-03-30

picocli

## Class CommandLine.ParseResult.MatchedGroup

- java.lang.Object
- - picocli.CommandLine.ParseResult.MatchedGroup

- Enclosing class:
    CommandLine.ParseResult

      public static class CommandLine.ParseResult.MatchedGroup
      extends java.lang.Object

  Provides information about an `CommandLine.ArgGroup` that was matched on the command line.

  The `ParseResult` may have more than one `MatchedGroup` for an `ArgGroupSpec`, when the group was matched more often than its maximum multiplicity. This is not necessarily a problem: the parser will add a multiple to the parent matched group until the maximum multiplicity of the parent group is exceeded, in which case parser will add a multiple to the parent's parent group, etc.

  Ultimately, as long as the `CommandLine.ParseResult.getMatchedGroupMultiples()` method does not return more than one multiple, the maximum number of elements is not exceeded.

  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Model.ArgGroupSpec` | `group()` Returns the `ArgGroupSpec` whose matches are captured in this `MatchedGroup`.
    `java.util.List<CommandLine.ParseResult.MatchedGroupMultiple>` | `multiples()` Returns the list of `MatchedGroupMultiple` instances: `ArgGroupSpec`s with a multiplicity greater than one may be matched multiple times.
    `CommandLine.ParseResult.MatchedGroup` | `parentMatchedGroup()` Returns the `MatchedGroup` of the parent `ArgGroupSpec`, or `null` if this group has no parent.
    `java.lang.String` | `toString()`

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

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

- - ### Method Detail

    - #### group

          public CommandLine.Model.ArgGroupSpec group()

      Returns the `ArgGroupSpec` whose matches are captured in this `MatchedGroup`.

    - #### parentMatchedGroup

          public CommandLine.ParseResult.MatchedGroup parentMatchedGroup()

      Returns the `MatchedGroup` of the parent `ArgGroupSpec`, or `null` if this group has no parent.

    - #### multiples

          public java.util.List<CommandLine.ParseResult.MatchedGroupMultiple> multiples()

      Returns the list of `MatchedGroupMultiple` instances: `ArgGroupSpec`s with a multiplicity greater than one may be matched multiple times.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`