From ee6a9305a1009e6f1e3e99d5de3cfba5305a5d1b Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Sat, 13 Mar 2021 10:13:01 -0500 Subject: Update documentation Also, did the same thing for Die I did for DiePool, where I moved the specific classes to the same file as the interface. --- .../bjc/dicelang/neodice/commands/LiteralCommand.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'dice/src/example/java/bjc/dicelang/neodice/commands/LiteralCommand.java') diff --git a/dice/src/example/java/bjc/dicelang/neodice/commands/LiteralCommand.java b/dice/src/example/java/bjc/dicelang/neodice/commands/LiteralCommand.java index 9b42b42..b781ae9 100644 --- a/dice/src/example/java/bjc/dicelang/neodice/commands/LiteralCommand.java +++ b/dice/src/example/java/bjc/dicelang/neodice/commands/LiteralCommand.java @@ -5,12 +5,28 @@ import java.util.*; import bjc.dicelang.neodice.*; import bjc.dicelang.neodice.statements.*; +/** + * A command that produces a literal statement value. + * + * This command will always produce the same statement value, so passing any sort + * of mutable statement value to it is asking to be hurt. + * + * @author Ben Culkin + * + */ public class LiteralCommand implements Command { private final StatementValue value; private final String shortHelp; private final String longHelp; + /** + * Create a new command producing a literal statement value. + * + * @param value The value this command returns. + * @param shortHelp The short-help (summary) for this command. + * @param longHelp The long-help (description) for this command. + */ public LiteralCommand(StatementValue value, String shortHelp, String longHelp) { this.value = value; -- cgit v1.2.3