aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/xml/XmlElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/xml/XmlElement.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/xml/XmlElement.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/xml/XmlElement.java b/src/main/java/org/zwobble/mammoth/xml/XmlElement.java
new file mode 100644
index 0000000..a49f5f8
--- /dev/null
+++ b/src/main/java/org/zwobble/mammoth/xml/XmlElement.java
@@ -0,0 +1,30 @@
+package org.zwobble.mammoth.xml;
+
+import java.util.List;
+import java.util.Map;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.ToString;
+
+@RequiredArgsConstructor
+@EqualsAndHashCode
+@ToString
+public class XmlElement implements XmlNode {
+ public XmlElement(String name) {
+ this(name, ImmutableMap.of());
+ }
+
+ public XmlElement(String name, Map<String, String> attributes) {
+ this(name, attributes, ImmutableList.of());
+ }
+
+ @Getter
+ private final String name;
+ private final Map<String, String> attributes;
+ private final List<XmlNode> children;
+}