Package com.hexagonkt.args
Class Command
-
- All Implemented Interfaces:
public final class CommandA program can have multiple commands with their own set of options and positional parameters.
-
-
Field Summary
Fields Modifier and Type Field Description private final Set<Flag>flagsprivate final Set<Option<?>>optionsprivate final Set<Parameter<?>>parametersprivate final Map<String, Property<?>>propertiesMapprivate final Map<String, Option<?>>optionsMapprivate final Map<String, Parameter<?>>parametersMapprivate final Map<String, Command>subcommandsMapprivate final Stringnameprivate final Stringtitleprivate final Stringdescriptionprivate final Set<Property<?>>propertiesprivate final Set<Command>subcommands
-
Method Summary
Modifier and Type Method Description final Set<Flag>getFlags()final Set<Option<?>>getOptions()final Set<Parameter<?>>getParameters()final Map<String, Property<?>>getPropertiesMap()final Map<String, Option<?>>getOptionsMap()final Map<String, Parameter<?>>getParametersMap()final Map<String, Command>getSubcommandsMap()final StringgetName()final StringgetTitle()final StringgetDescription()final Set<Property<?>>getProperties()final Set<Command>getSubcommands()final CommandfindCommand(Iterable<String> args)final Commandparse(List<String> args)final <T extends Any> List<T>propertyValues(String name)final <T extends Any> TpropertyValueOrNull(String name)final <T extends Any> TpropertyValue(String name)final Booleancontains(Flag flag, Iterable<String> args)-
-
Method Detail
-
getOptions
final Set<Option<?>> getOptions()
-
getParameters
final Set<Parameter<?>> getParameters()
-
getPropertiesMap
final Map<String, Property<?>> getPropertiesMap()
-
getOptionsMap
final Map<String, Option<?>> getOptionsMap()
-
getParametersMap
final Map<String, Parameter<?>> getParametersMap()
-
getSubcommandsMap
final Map<String, Command> getSubcommandsMap()
-
getName
final String getName()
-
getTitle
final String getTitle()
-
getDescription
final String getDescription()
-
getProperties
final Set<Property<?>> getProperties()
-
getSubcommands
final Set<Command> getSubcommands()
-
findCommand
final Command findCommand(Iterable<String> args)
-
propertyValues
final <T extends Any> List<T> propertyValues(String name)
-
propertyValueOrNull
final <T extends Any> T propertyValueOrNull(String name)
-
propertyValue
final <T extends Any> T propertyValue(String name)
-
-
-
-