From df94066e3af02ff02d5ab4d033a3d603f743234c Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:45:04 -0500 Subject: Formatting pass --- base/src/main/java/bjc/utils/gen/RandomGrammar.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'base/src/main/java/bjc/utils/gen/RandomGrammar.java') diff --git a/base/src/main/java/bjc/utils/gen/RandomGrammar.java b/base/src/main/java/bjc/utils/gen/RandomGrammar.java index 978accb..b418c79 100644 --- a/base/src/main/java/bjc/utils/gen/RandomGrammar.java +++ b/base/src/main/java/bjc/utils/gen/RandomGrammar.java @@ -9,7 +9,7 @@ import bjc.utils.funcdata.IList; * @author ben * * @param - * The type of grammar elements to use. + * The type of grammar elements to use. */ public class RandomGrammar extends WeightedGrammar { /** Create a new random grammar. */ @@ -21,14 +21,14 @@ public class RandomGrammar extends WeightedGrammar { * Add cases to a specified rule. * * @param rule - * The name of the rule to add cases to. + * The name of the rule to add cases to. * * @param cases - * The cases to add for this rule. + * The cases to add for this rule. */ @SafeVarargs public final void addCases(final E rule, final IList... cases) { - for (final IList currentCase : cases) { + for(final IList currentCase : cases) { super.addCase(rule, 1, currentCase); } } @@ -37,16 +37,16 @@ public class RandomGrammar extends WeightedGrammar { * Create a rule with the specified name and cases. * * @param rule - * The name of the rule to add. + * The name of the rule to add. * * @param cases - * The cases to add for this rule. + * The cases to add for this rule. */ @SafeVarargs public final void makeRule(final E rule, final IList... cases) { super.addRule(rule); - for (final IList currentCase : cases) { + for(final IList currentCase : cases) { super.addCase(rule, 1, currentCase); } } @@ -55,13 +55,13 @@ public class RandomGrammar extends WeightedGrammar { * Create a rule with the specified name and cases. * * @param rule - * The name of the rule to add. + * The name of the rule to add. * * @param cases - * The cases to add for this rule. + * The cases to add for this rule. */ public void makeRule(final E rule, final IList> cases) { - if (cases == null) throw new NullPointerException("Cases must not be null"); + if(cases == null) throw new NullPointerException("Cases must not be null"); super.addRule(rule); -- cgit v1.2.3