summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/cli/CommandMode.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/cli/CommandMode.java')
-rw-r--r--base/src/main/java/bjc/utils/cli/CommandMode.java24
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;