aboutsummaryrefslogtreecommitdiff
path: root/src/main/model/html/TextNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/model/html/TextNode.java')
-rw-r--r--src/main/model/html/TextNode.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/model/html/TextNode.java b/src/main/model/html/TextNode.java
index 634bf3b..cf0078b 100644
--- a/src/main/model/html/TextNode.java
+++ b/src/main/model/html/TextNode.java
@@ -5,14 +5,19 @@ import model.util.Node;
public class TextNode implements Node {
private String text = "";
- public String getText() {
- return this.text;
- }
-
+ /**
+ * EFFECTS: Creates a new TextNode from the provided String value.
+ * MODIFIES: this
+ */
public TextNode(String text) {
this.text = text;
}
+ public String getText() {
+ return this.text;
+ }
+
+ // We implement this method for easy debugging.
public String getData() {
return getText();
}