aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java b/src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java
new file mode 100644
index 0000000..f3ef3f8
--- /dev/null
+++ b/src/main/java/org/zwobble/mammoth/html/HtmlSelfClosingElement.java
@@ -0,0 +1,16 @@
+package org.zwobble.mammoth.html;
+
+public class HtmlSelfClosingElement implements HtmlNode {
+ private final String tagName;
+
+ public HtmlSelfClosingElement(String tagName) {
+ this.tagName = tagName;
+ }
+
+ @Override
+ public void write(StringBuilder builder) {
+ builder.append("<")
+ .append(tagName)
+ .append(" />");
+ }
+}