diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:44:36 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:44:36 -0400 |
| commit | dca8e9f586fd595a7995f07788318fb92b8cce79 (patch) | |
| tree | 4fdf216d4a30c2c663d4a429f79cfa471c8579c4 /BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java | |
| parent | b1317e5e62bb044cd8a676cb3fc2da86e9922caf (diff) | |
Format/Cleanup pass
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java b/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java index 59d3dc3..4b3b4fd 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommandMode.java @@ -21,24 +21,24 @@ public class GenericCommandMode implements ICommandMode { /* * Contains the commands this mode handles */ - private IMap<String, ICommand> commandHandlers; - private IMap<String, ICommand> defaultHandlers; + private IMap<String, ICommand> commandHandlers; + private IMap<String, ICommand> defaultHandlers; // Contains help topics without an associated command - private IMap<String, ICommandHelp> helpTopics; + private IMap<String, ICommandHelp> helpTopics; // The action to execute upon encountering an unknown command - private BiConsumer<String, String[]> unknownCommandHandler; + private BiConsumer<String, String[]> unknownCommandHandler; // The functions to use for input/output - private Consumer<String> errorOutput; - private Consumer<String> normalOutput; + private Consumer<String> errorOutput; + private Consumer<String> normalOutput; // The name of this command mode, or null if it is unnamed - private String modeName; + private String modeName; // The custom prompt to use, or null if none is specified - private String customPrompt; + private String customPrompt; /** * Create a new generic command mode @@ -332,6 +332,11 @@ public class GenericCommandMode implements ICommandMode { } @Override + public boolean isCustomPromptEnabled() { + return customPrompt != null; + } + + @Override public ICommandMode process(String command, String[] args) { normalOutput.accept("\n"); @@ -414,9 +419,4 @@ public class GenericCommandMode implements ICommandMode { defaultHandlers.put("exit", buildExitCommand()); } - - @Override - public boolean isCustomPromptEnabled() { - return customPrompt != null; - } }
\ No newline at end of file |
