package org.zwobble.mammoth.html;
import java.util.Map;
public class HtmlSelfClosingElement implements HtmlNode {
private final String tagName;
private final Map attributes;
public HtmlSelfClosingElement(String tagName, Map attributes) {
this.tagName = tagName;
this.attributes = attributes;
}
public Map getAttributes() {
return attributes;
}
@Override
public void write(StringBuilder builder) {
builder.append("<").append(tagName);
HtmlWriter.generateAttributes(attributes, builder);
builder.append(" />");
}
}