diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:40:41 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:40:41 -0400 |
| commit | d4ca769e542b2489b1e23cfcbdc3a0b7275b87cd (patch) | |
| tree | 1653a7399f97fb0c63ce62e3f60fd830d5c37f70 /base/src/main/java/bjc/utils/cli/CommandMode.java | |
| parent | 2ac2e31a56ae59ee582e43a90c3495f86dd9ee7a (diff) | |
Cleanup pass
Cleanup pass to uniformize things
Diffstat (limited to 'base/src/main/java/bjc/utils/cli/CommandMode.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/cli/CommandMode.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/base/src/main/java/bjc/utils/cli/CommandMode.java b/base/src/main/java/bjc/utils/cli/CommandMode.java index b33077b..c145c1c 100644 --- a/base/src/main/java/bjc/utils/cli/CommandMode.java +++ b/base/src/main/java/bjc/utils/cli/CommandMode.java @@ -11,10 +11,10 @@ public interface CommandMode extends Comparable<CommandMode> { * Check to see if this mode can handle the specified command. * * @param command - * The command to check. + * The command to check. * - * @return Whether or not this mode can handle the command. It is - * assumed not by default. + * @return Whether or not this mode can handle the command. It is assumed not by + * default. */ default boolean canHandle(final String command) { return false; @@ -26,17 +26,19 @@ public interface CommandMode extends Comparable<CommandMode> { * @return The custom prompt for this mode. * * @throws UnsupportedOperationException - * If this mode doesn't support a custom prompt. + * If this mode doesn't support a custom + * prompt. */ default String getCustomPrompt() { - throw new UnsupportedOperationException("This mode doesn't support a custom prompt"); + throw new UnsupportedOperationException( + "This mode doesn't support a custom prompt"); } /** * Get the name of this command mode. * - * @return The name of this command mode, or a default string if one - * isn't specified. + * @return The name of this command mode, or a default string if one isn't + * specified. */ public default String getName() { return "(anonymous)"; @@ -55,13 +57,13 @@ public interface CommandMode extends Comparable<CommandMode> { * Process a command in this mode.. * * @param command - * The command to process. + * The command to process. * * @param args - * A list of arguments to the command. + * A list of arguments to the command. * - * @return The command mode to use for the next command. Defaults to - * doing nothing, and staying in the current mode. + * @return The command mode to use for the next command. Defaults to doing + * nothing, and staying in the current mode. */ default CommandMode process(final String command, final String[] args) { return this; |
