diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
| commit | 946cab444bc301d8a7c756a1bab039558288de89 (patch) | |
| tree | 419f27c39a509bcd83cae0e6630be8eb7ff95a30 /base/src/main/java/bjc/utils/cli/GenericCommand.java | |
| parent | c82e3b3b2de0633317ec8fc85925e91422820597 (diff) | |
Cleanup work
Diffstat (limited to 'base/src/main/java/bjc/utils/cli/GenericCommand.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/cli/GenericCommand.java | 23 |
1 files changed, 5 insertions, 18 deletions
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); } } |
