public class Module
extends java.lang.Object
Constructor and Description |
---|
Module(java.lang.String name)
Sets the name and the display promt that will come up on the CLI
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(Command c)
Adds to a list of commands that are only accessible when the user has
switched to this module.
|
void |
appendHelpPage(java.lang.String append)
Adds additional information to the module's help page
|
java.util.ArrayList<Command> |
getCommands() |
java.lang.String |
getName() |
java.util.ArrayList<java.lang.String> |
getReferences()
Returns a list with the default reference of each command conatined within
the module, plus 'help' and 'exit'
|
void |
resetHelpPage(java.lang.String reset)
Replaces the module's help page with a given String
|
public Module(java.lang.String name)
name
- public java.lang.String getName()
public java.util.ArrayList<Command> getCommands()
public void addCommand(Command c)
c
- public void appendHelpPage(java.lang.String append)
append
- Information to append to help pagepublic void resetHelpPage(java.lang.String reset)
reset
- New help page to displaypublic java.util.ArrayList<java.lang.String> getReferences()