@Test public void testHtmlTag() { assertEquals("<html><h1>Foo</h1><div id=\"bla\" class=\"blabla\">Hello!</div></html>", HtmlTag.html().add(HtmlTag.h1("Foo")).add(HtmlTag.div("bla").attr("class", "blabla").add("Hello!")).toString()); HtmlTag html = HtmlTag.html(); assertEquals("<div>Hello!</div>", HtmlTag.div().add("Hello!").appendTo(html).toString()); assertEquals("<html><div>Hello!</div></html>", html.toString()); }
private HtmlTag(String name) { this.name = name; this.contents = new LinkedList<>(); }
HtmlTag { private HtmlTag(String name) { this.name = name; this.contents = new LinkedList<>(); } }
HtmlTag { private HtmlTag(String name) { this.name = name; this.contents = new LinkedList<>(); } private  HtmlTag(String name); }
HtmlTag { private HtmlTag(String name) { this.name = name; this.contents = new LinkedList<>(); } private  HtmlTag(String name); @Override String toString(); }
HtmlTag { private HtmlTag(String name) { this.name = name; this.contents = new LinkedList<>(); } private  HtmlTag(String name); @Override String toString();  }