summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/gen/RandomGrammar.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@mix.wvu.edu>2018-02-12 22:45:04 -0500
committerbjculkin <bjculkin@mix.wvu.edu>2018-02-12 22:45:04 -0500
commitdf94066e3af02ff02d5ab4d033a3d603f743234c (patch)
tree168a1edaf58d386c175ffb601e9d4da8e13d31e2 /base/src/main/java/bjc/utils/gen/RandomGrammar.java
parentae51c587c53f7ca311e556e3cbd0c5566d6c2843 (diff)
Formatting pass
Diffstat (limited to 'base/src/main/java/bjc/utils/gen/RandomGrammar.java')
-rw-r--r--base/src/main/java/bjc/utils/gen/RandomGrammar.java20
1 files changed, 10 insertions, 10 deletions
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 <E>
- * The type of grammar elements to use.
+ * The type of grammar elements to use.
*/
public class RandomGrammar<E> extends WeightedGrammar<E> {
/** Create a new random grammar. */
@@ -21,14 +21,14 @@ public class RandomGrammar<E> extends WeightedGrammar<E> {
* 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<E>... cases) {
- for (final IList<E> currentCase : cases) {
+ for(final IList<E> currentCase : cases) {
super.addCase(rule, 1, currentCase);
}
}
@@ -37,16 +37,16 @@ public class RandomGrammar<E> extends WeightedGrammar<E> {
* 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<E>... cases) {
super.addRule(rule);
- for (final IList<E> currentCase : cases) {
+ for(final IList<E> currentCase : cases) {
super.addCase(rule, 1, currentCase);
}
}
@@ -55,13 +55,13 @@ public class RandomGrammar<E> extends WeightedGrammar<E> {
* 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<IList<E>> 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);