Package picocli
Class CommandLine.ParseResult.GroupMatch
- java.lang.Object
-
- picocli.CommandLine.ParseResult.GroupMatch
-
- Enclosing class:
- CommandLine.ParseResult
public static class CommandLine.ParseResult.GroupMatch extends java.lang.ObjectA group's multiplicity specifies how many matches of a group may appear on the command line. This class models a single "match". For example, this group:(-a -b) (-a -b)requires two matches of its arguments to fully match.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.ParseResult.GroupMatchContainercontainer()Returns the containerGroupMatchContainerof this match.CommandLine.Model.ArgGroupSpecgroup()Returns theArgGroupSpecof the containerGroupMatchContainerof this match.booleanisEmpty()Returnstrueif this match has no matched arguments and no matched subgroups.java.util.Map<CommandLine.Model.ArgGroupSpec,CommandLine.ParseResult.GroupMatchContainer>matchedSubgroups()Returns matches for the subgroups, if any.java.util.List<java.lang.Object>matchedValues(CommandLine.Model.ArgSpec argSpec)Returns the values matched for the specified argument, converted to the type of the argument.java.lang.StringtoString()
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Returnstrueif this match has no matched arguments and no matched subgroups.
-
group
public CommandLine.Model.ArgGroupSpec group()
Returns theArgGroupSpecof the containerGroupMatchContainerof this match.
-
container
public CommandLine.ParseResult.GroupMatchContainer container()
Returns the containerGroupMatchContainerof this match.
-
matchedSubgroups
public java.util.Map<CommandLine.Model.ArgGroupSpec,CommandLine.ParseResult.GroupMatchContainer> matchedSubgroups()
Returns matches for the subgroups, if any.
-
matchedValues
public java.util.List<java.lang.Object> matchedValues(CommandLine.Model.ArgSpec argSpec)
Returns the values matched for the specified argument, converted to the type of the argument.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-