From 985c3e8e9eeff790a138d74aeea30bc069cb97f9 Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sun, 23 Jul 2017 16:27:29 -0300 Subject: Formatting --- .../main/java/bjc/rgens/newparser/RuleCase.java | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'RGens/src/main/java/bjc/rgens/newparser/RuleCase.java') diff --git a/RGens/src/main/java/bjc/rgens/newparser/RuleCase.java b/RGens/src/main/java/bjc/rgens/newparser/RuleCase.java index 9652273..3f971c3 100644 --- a/RGens/src/main/java/bjc/rgens/newparser/RuleCase.java +++ b/RGens/src/main/java/bjc/rgens/newparser/RuleCase.java @@ -4,13 +4,13 @@ import bjc.utils.funcdata.IList; /** * A case in a rule in a randomized grammar. - * + * * @author EVE */ public class RuleCase { /** * The possible types of a case. - * + * * @author EVE * */ @@ -28,7 +28,7 @@ public class RuleCase { /** * The list of element values for this case. - * + * *

Used For

*
*
NORMAL
@@ -39,17 +39,18 @@ public class RuleCase { /** * Create a new case of the specified type. - * + * * @param typ * The type of case to create. - * + * * @throws IllegalArgumentException * If the type requires parameters. */ public RuleCase(CaseType typ) { - switch(typ) { + switch (typ) { case NORMAL: throw new IllegalArgumentException("This type requires an element list parameter"); + default: break; } @@ -60,20 +61,21 @@ public class RuleCase { /** * Create a new case of the specified type that takes a element list * parameter. - * + * * @param typ * The type of case to create. - * + * * @param elements * The element list parameter of the case. - * + * * @throws IllegalArgumentException * If this type doesn't take a element list parameter. */ public RuleCase(CaseType typ, IList elements) { - switch(typ) { + switch (typ) { case NORMAL: break; + default: throw new IllegalArgumentException("This type doesn't have a element list parameter"); } @@ -85,7 +87,7 @@ public class RuleCase { /** * Get the element list value of this type. - * + * * @return The element list value of this case, or null if this type * doesn't have one. */ -- cgit v1.2.3