From 946cab444bc301d8a7c756a1bab039558288de89 Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Wed, 11 Oct 2017 13:41:07 -0300 Subject: Cleanup work --- .../main/java/bjc/utils/cli/GenericCommand.java | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'base/src/main/java/bjc/utils/cli/GenericCommand.java') diff --git a/base/src/main/java/bjc/utils/cli/GenericCommand.java b/base/src/main/java/bjc/utils/cli/GenericCommand.java index 4ae4dea..89539a4 100644 --- a/base/src/main/java/bjc/utils/cli/GenericCommand.java +++ b/base/src/main/java/bjc/utils/cli/GenericCommand.java @@ -4,17 +4,12 @@ package bjc.utils.cli; * Generic command implementation. * * @author ben - * */ public class GenericCommand implements Command { - /* - * The behavior for invoking the command. - */ + /* The behavior for invoking the command. */ private final CommandHandler handler; - /* - * The help for the command. - */ + /* The help for the command. */ private CommandHelp help; /** @@ -22,9 +17,11 @@ public class GenericCommand implements Command { * * @param handler * The handler to use for the command. + * * @param description * The description of the command. May be null, in which * case a default is provided. + * * @param help * The detailed help message for the command. May be * null, in which case the description is repeated for @@ -69,16 +66,6 @@ public class GenericCommand implements Command { */ @Override public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("GenericCommand ["); - - if (help != null) { - builder.append("help="); - builder.append(help); - } - - builder.append("]"); - - return builder.toString(); + return String.format("GenericCommand [help=%s]", help); } } -- cgit v1.2.3