Package picocli
Class CommandLine.ParseResult.GroupMatchContainer
- java.lang.Object
-
- picocli.CommandLine.ParseResult.GroupMatchContainer
-
- Enclosing class:
- CommandLine.ParseResult
public static class CommandLine.ParseResult.GroupMatchContainer extends java.lang.ObjectProvides information about anCommandLine.ArgGroupthat was matched on the command line.The
ParseResultmay have more than oneGroupMatchContainerfor anArgGroupSpec, when the group was matched more often than its maximum multiplicity. This is not necessarily a problem: the parser will add a match to the parent matched group until the maximum multiplicity of the parent group is exceeded, in which case parser will add a match to the parent's parent group, etc.Ultimately, as long as the
CommandLine.ParseResult.getGroupMatches()method does not return more than one match, the maximum number of elements is not exceeded.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.Model.ArgGroupSpecgroup()Returns theArgGroupSpecwhose matches are captured in thisGroupMatchContainer.java.util.List<CommandLine.ParseResult.GroupMatch>matches()Returns the list ofGroupMatchinstances:ArgGroupSpecs with a multiplicity greater than one may be matched multiple times.java.lang.StringtoString()
-
-
-
Method Detail
-
group
public CommandLine.Model.ArgGroupSpec group()
Returns theArgGroupSpecwhose matches are captured in thisGroupMatchContainer.
-
matches
public java.util.List<CommandLine.ParseResult.GroupMatch> matches()
Returns the list ofGroupMatchinstances:ArgGroupSpecs with a multiplicity greater than one may be matched multiple times.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-