summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:25 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:25 -0400
commit0fa4f162f4e42a455dbb7e7459854b9467337863 (patch)
tree64e22da06f641f2ad1d2e1f0dc6f818b404c8661 /dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java
parenta3e0b3da5d7b0ec8dcae92a428f8e3f1c6cd6e8e (diff)
Formatting changes
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java60
1 files changed, 30 insertions, 30 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java b/dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java
index 474e18c..4585f75 100644
--- a/dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java
+++ b/dice-lang/src/main/java/bjc/dicelang/IDiceExpression.java
@@ -11,36 +11,6 @@ import bjc.utils.funcutils.StringUtils;
@FunctionalInterface
public interface IDiceExpression {
/**
- * Roll the dice once
- *
- * @return The result of rowing the dice
- */
- public int roll();
-
- /**
- * Optimize this expression to a scalar value
- *
- * @return This expression, optimized to a scalar value
- *
- * @throws UnsupportedOperationException
- * if this type of expression can't be optimized
- */
- public default int optimize() {
- throw new UnsupportedOperationException(
- "Can't optimize this type of expression");
- }
-
- /**
- * Check if this expression can be optimized to a scalar value
- *
- * @return Whether or not this expression can be optimized to a scalar
- * value
- */
- public default boolean canOptimize() {
- return false;
- }
-
- /**
* Parse this node into an expression
*
* @param expression
@@ -73,4 +43,34 @@ public interface IDiceExpression {
}
}
}
+
+ /**
+ * Check if this expression can be optimized to a scalar value
+ *
+ * @return Whether or not this expression can be optimized to a scalar
+ * value
+ */
+ public default boolean canOptimize() {
+ return false;
+ }
+
+ /**
+ * Optimize this expression to a scalar value
+ *
+ * @return This expression, optimized to a scalar value
+ *
+ * @throws UnsupportedOperationException
+ * if this type of expression can't be optimized
+ */
+ public default int optimize() {
+ throw new UnsupportedOperationException(
+ "Can't optimize this type of expression");
+ }
+
+ /**
+ * Roll the dice once
+ *
+ * @return The result of rowing the dice
+ */
+ public int roll();
} \ No newline at end of file