diff options
| author | EVE <EVE@EVE-PC> | 2017-03-14 12:08:11 -0400 |
|---|---|---|
| committer | EVE <EVE@EVE-PC> | 2017-03-14 12:08:11 -0400 |
| commit | 635d3150e3e85c01b777ff165e21fa8965d58440 (patch) | |
| tree | 3389128f83a5a79f8d0eec0a0e19f54b9d117b66 /dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java | |
| parent | e59e2a97773f93bdd25bd4680809c10699f0feb3 (diff) | |
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java index cce31a2..14dbc42 100644 --- a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java +++ b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java @@ -5,7 +5,7 @@ import java.util.Map; /** * A variable expression that represents binding a variable to a name in an * enviroment - * + * * @author ben * */ @@ -23,7 +23,7 @@ public class BindingDiceExpression implements IDiceExpression { /** * Create a new dice expression binder from two expressions and an * enviroment - * + * * @param left * The left side expression to get a name from. Must be a * ReferenceDiceExpression @@ -34,12 +34,10 @@ public class BindingDiceExpression implements IDiceExpression { */ public BindingDiceExpression(IDiceExpression left, IDiceExpression right, Map<String, IDiceExpression> enviroment) { - if (!(left instanceof ReferenceDiceExpression)) { - throw new UnsupportedOperationException( - "Error: Binding an expression to something that is not a variable reference," - + " or array thereof. is unsupported." - + " Problematic expression is " + left); - } + if(!(left instanceof ReferenceDiceExpression)) throw new UnsupportedOperationException( + "Error: Binding an expression to something that is not a variable reference," + + " or array thereof. is unsupported." + " Problematic expression is " + + left); String varName = ((ReferenceDiceExpression) left).getName(); @@ -48,7 +46,7 @@ public class BindingDiceExpression implements IDiceExpression { /** * Create a new dice expression binder - * + * * @param name * The name of the variable to bind * @param expression @@ -69,7 +67,7 @@ public class BindingDiceExpression implements IDiceExpression { /* * (non-Javadoc) - * + * * @see bjc.utils.dice.IDiceExpression#roll() */ @Override @@ -79,7 +77,7 @@ public class BindingDiceExpression implements IDiceExpression { /* * (non-Javadoc) - * + * * @see java.lang.Object#toString() */ @Override |
