summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-04 08:17:04 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-04 08:17:04 -0400
commit12280e8f01b4f761c65bad11e5316cfc4655a431 (patch)
tree5605eb9eb5982a26d4823a9c7ec4afbb8dcea0da /dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java
parentadea5713f3d6711885108e359813b4a62ffee98f (diff)
Moved nodes to new packages
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java94
1 files changed, 0 insertions, 94 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java b/dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java
deleted file mode 100644
index b80f1a4..0000000
--- a/dice-lang/src/main/java/bjc/dicelang/ast/LiteralDiceNode.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package bjc.dicelang.ast;
-
-/**
- * A AST node that represents a literal value
- *
- * @author ben
- *
- */
-public class LiteralDiceNode implements IDiceASTNode {
- /**
- * The value contained by this node
- */
- private String value;
-
- /**
- * Create a new node with the given value
- *
- * @param data
- * The value to be in this node
- */
- public LiteralDiceNode(String data) {
- this.value = data;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- } else if (obj == null) {
- return false;
- } else if (getClass() != obj.getClass()) {
- return false;
- } else {
- LiteralDiceNode other = (LiteralDiceNode) obj;
-
- if (value == null) {
- if (other.value != null) {
- return false;
- }
- } else if (!value.equals(other.value)) {
- return false;
- }
-
- return true;
- }
- }
-
- /**
- * Get the data stored in this AST node
- *
- * @return the data stored in this AST node
- */
- public String getData() {
- return value;
- }
-
- @Override
- public DiceASTType getType() {
- return DiceASTType.LITERAL;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((value == null) ? 0 : value.hashCode());
- return result;
- }
-
- @Override
- public boolean isOperator() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return value;
- }
-} \ No newline at end of file