aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorj-james2022-10-17 15:35:42 +0000
committerj-james2022-10-17 15:35:42 +0000
commite1b3f9b8f017ec1f3e1504bd09f47cd9dc6516bd (patch)
treeb0e3c89afe3783f90a74500634aac8d1afa158b8 /src
parent21b8e5f6cdcd9fab275efce5e88f02addfd19e7e (diff)
what do you mean force pushing isn't allowed
oh the embarrassment of forgetting class descriptions
Diffstat (limited to 'src')
-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.