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 CommandMetadata
private final String
private final boolean
private final String
private final List
<OptionMetadata> private CommandGroupMetadata
private 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 TypeMethodDescriptionvoid
addCommand
(CommandMetadata command) Adds a command to the groupvoid
addSubGroup
(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 groupboolean
isHidden()
Gets whether the group is hiddenvoid
setParent
(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
Gets the name of the group- Returns:
- Name
-
getDescription
Gets the description for the group- Returns:
- Description
-
isHidden
public boolean isHidden()Gets whether the group is hidden- Returns:
- True if hidden, false otherwise
-
getOptions
Gets the group options- Returns:
- Group options
-
getDefaultCommand
Gets the default command for the group- Returns:
- Default command
-
getCommands
Gets the commands for the group- Returns:
- Commands
-
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
-