Class CommandGroupMetadata
java.lang.Object
com.github.rvesse.airline.model.CommandGroupMetadata
Represents meta-data about a command group
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<CommandMetadata> private final CommandMetadataprivate final Stringprivate final booleanprivate final Stringprivate final List<OptionMetadata> private CommandGroupMetadataprivate final List<CommandGroupMetadata> -
Constructor Summary
ConstructorsConstructorDescriptionCommandGroupMetadata(String name, String description, boolean hidden, Iterable<OptionMetadata> options, Iterable<CommandGroupMetadata> subGroups, CommandMetadata defaultCommand, Iterable<CommandMetadata> commands) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(CommandMetadata command) Adds a command to the groupvoidaddSubGroup(CommandGroupMetadata subGroup) Adds a sub-group to the groupGets the commands for the groupGets the default command for the groupGets the description for the groupgetName()Gets the name of the groupGets the group optionsGets the parent group which may be nullGets the sub-groups of this groupbooleanisHidden()Gets whether the group is hiddenvoidsetParent(CommandGroupMetadata parent) Sets the parent for a grouptoString()
-
Field Details
-
name
-
description
-
options
-
defaultCommand
-
commands
-
subGroups
-
parentGroup
-
-
Constructor Details
-
CommandGroupMetadata
public CommandGroupMetadata(String name, String description, boolean hidden, Iterable<OptionMetadata> options, Iterable<CommandGroupMetadata> subGroups, CommandMetadata defaultCommand, Iterable<CommandMetadata> commands)
-
-
Method Details
-
getName
-
getDescription
-
isHidden
public boolean isHidden()Gets whether the group is hidden- Returns:
- True if hidden, false otherwise
-
getOptions
-
getDefaultCommand
Gets the default command for the group- Returns:
- Default command
-
getCommands
-
addCommand
Adds a command to the group- Parameters:
command- Command
-
getSubGroups
Gets the sub-groups of this group- Returns:
- Sub-groups
-
addSubGroup
Adds a sub-group to the group- Parameters:
subGroup- Sub-group
-
setParent
Sets the parent for a group- Parameters:
parent- Parent group
-
getParent
Gets the parent group which may be null- Returns:
- Parent group, null if a top level group
-
toString
-