diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-10-06 19:16:26 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-10-06 19:16:26 -0400 |
| commit | e9e0ca7bfe722375e7ccb25d2bafbe395b6c6a59 (patch) | |
| tree | 8e8e556724683d4d10d7da1f3e85705a50ae33c6 /src/main/java/bjc/rgens/parser/RuleCase.java | |
| parent | a3ea557c0b7204f56b1499687cc7f82c5b1677a5 (diff) | |
Info cleanup
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RuleCase.java')
| -rwxr-xr-x | src/main/java/bjc/rgens/parser/RuleCase.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/main/java/bjc/rgens/parser/RuleCase.java b/src/main/java/bjc/rgens/parser/RuleCase.java index dacb16e..3cfe81d 100755 --- a/src/main/java/bjc/rgens/parser/RuleCase.java +++ b/src/main/java/bjc/rgens/parser/RuleCase.java @@ -15,14 +15,25 @@ import java.util.List; * @author EVE */ public abstract class RuleCase { + /** + * Debugging name for this case. + */ public String debugName; + /** + * Serial number for this case. + */ public final int serial; - private static int nextSerial = 0; + /** + * The rule this case belongs to. + */ public Rule belongsTo; + /** + * The elements that make up this case. + */ public List<CaseElement> elementList; /** @@ -40,10 +51,23 @@ public abstract class RuleCase { nextSerial += 1; } + /** + * Generate this case. + * + * @param state The state to use. + */ public abstract void generate(GenerationState state); + /** + * Create a new case with a different set of elements. + * + * @param elements The elements for this case. + * + * @return The case with the same settings, but a different set of elements. + */ public abstract RuleCase withElements(List<CaseElement> elements); + @Override public String toString() { if(debugName != null) { return String.format("Case %s (#%d) of %s", debugName, serial, belongsTo); |
