Package org.jline.shell.impl
Class SimpleCommandGroup
java.lang.Object
org.jline.shell.impl.SimpleCommandGroup
- All Implemented Interfaces:
CommandGroup
- Direct Known Subclasses:
AliasCommands,HelpCommands,HistoryCommands,JobCommands,OptionCommands
Default implementation of
CommandGroup backed by a list of commands.- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleCommandGroup(String name, Collection<Command> commands) Creates a new command group with the given name and commands.SimpleCommandGroup(String name, Command... commands) Creates a new command group with the given name and commands. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.shell.CommandGroup
command, hasCommand
-
Constructor Details
-
SimpleCommandGroup
-
SimpleCommandGroup
Creates a new command group with the given name and commands.- Parameters:
name- the group namecommands- the commands in this group
-
-
Method Details
-
name
Description copied from interface:CommandGroupReturns the name of this command group.The default implementation returns the simple class name.
- Specified by:
namein interfaceCommandGroup- Returns:
- the group name
-
commands
Description copied from interface:CommandGroupReturns all commands in this group.- Specified by:
commandsin interfaceCommandGroup- Returns:
- the collection of commands, never null
-