aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/model/html/ElementNode.java3
-rw-r--r--src/main/model/html/TextNode.java3
-rw-r--r--src/main/model/util/Node.java4
3 files changed, 8 insertions, 2 deletions
diff --git a/src/main/model/html/ElementNode.java b/src/main/model/html/ElementNode.java
index 98995d0..16438f9 100644
--- a/src/main/model/html/ElementNode.java
+++ b/src/main/model/html/ElementNode.java
@@ -6,6 +6,9 @@ import org.javatuples.Pair;
import java.util.ArrayList;
import java.util.Optional;
+/**
+ * This ElementNode class represents an HTML tag and nested tags.
+ */
public class ElementNode implements Node {
private String tag;
private ArrayList<Pair<String,String>> attributes;
diff --git a/src/main/model/html/TextNode.java b/src/main/model/html/TextNode.java
index cf0078b..f6d3ce1 100644
--- a/src/main/model/html/TextNode.java
+++ b/src/main/model/html/TextNode.java
@@ -2,6 +2,9 @@ package model.html;
import model.util.Node;
+/**
+ * This TextNode class represents raw text, with no nested tags.
+ */
public class TextNode implements Node {
private String text = "";
diff --git a/src/main/model/util/Node.java b/src/main/model/util/Node.java
index 619404f..4057fab 100644
--- a/src/main/model/util/Node.java
+++ b/src/main/model/util/Node.java
@@ -1,8 +1,8 @@
package model.util;
/**
- * yeah there's nothing here
- * I just need to establish the inheritance relation of ElementNode and TextNode
+ * This Node represents an abstract relationship between ElementNode and TextNode.
+ * It's extremely helpful / necessary for Lists of arbitrary ElementNodes/TextNodes.
*/
public interface Node {
// Return a representation of the Node. Useful for debugging.