AbstractHtml extends AbstractJsObject { @SuppressWarnings("unchecked") public <T extends AbstractHtml> T give(final Consumer<T> consumer) { consumer.accept((T) this); return (T) this; } @SuppressWarnings("unused") private  AbstractHtml();  AbstractHtml(final AbstractHtml base,
            final Collection<? extends AbstractHtml> children);  AbstractHtml(final AbstractHtml base,
            final AbstractHtml... children); protected  AbstractHtml(final AbstractHtml base, final String childContent,
            final boolean noTagContentTypeHtml);  AbstractHtml(final AbstractHtml base, final String childContent);  AbstractHtml(final String tagName, final AbstractHtml base,
            final AbstractAttribute[] attributes); protected  AbstractHtml(final PreIndexedTagName preIndexedTagName,
            final AbstractHtml base, final AbstractAttribute[] attributes); protected  AbstractHtml(final TagType tagType, final String tagName,
            final AbstractHtml base, final AbstractAttribute[] attributes); private  AbstractHtml(final TagType tagType, final String tagName,
            final byte[] tagNameIndexBytes, final AbstractHtml base,
            final AbstractAttribute[] attributes); protected  AbstractHtml(final TagType tagType,
            final PreIndexedTagName preIndexedTagName, final AbstractHtml base,
            final AbstractAttribute[] attributes); boolean appendChild(final AbstractHtml child); void removeAllChildren(); void addInnerHtml(final AbstractHtml innerHtml); void addInnerHtmls(final AbstractHtml... innerHtmls); void addInnerHtml(final SharedTagContent<T> sharedTagContent); void addInnerHtml(final SharedTagContent<T> sharedTagContent,
            final SharedTagContent.ContentFormatter<T> formatter); void addInnerHtml(final boolean updateClient,
            final SharedTagContent<T> sharedTagContent); void addInnerHtml(final boolean updateClient,
            final SharedTagContent<T> sharedTagContent,
            final SharedTagContent.ContentFormatter<T> formatter); void subscribeTo(final SharedTagContent<T> sharedTagContent); void subscribeTo(final SharedTagContent<T> sharedTagContent,
            final SharedTagContent.ContentFormatter<T> formatter); void subscribeTo(final boolean updateClient,
            final SharedTagContent<T> sharedTagContent,
            final SharedTagContent.ContentFormatter<T> formatter); @SuppressWarnings("unchecked") SharedTagContent<T> getSharedTagContent(); boolean isSubscribedToSharedTagContent(); boolean removeSharedTagContent(final boolean removeContent); boolean removeChildren(final Collection<AbstractHtml> children); boolean removeChildren(final AbstractHtml... children); boolean removeChild(final AbstractHtml child); boolean addChild(final Object accessObject, final AbstractHtml child,
            final boolean invokeListener); void appendChildren(final Collection<AbstractHtml> children); void appendChildren(final AbstractHtml... children); void prependChildren(final AbstractHtml... children); void addAttributes(final AbstractAttribute... attributes); void addAttributes(final boolean updateClient,
            final AbstractAttribute... attributes); Collection<AbstractAttribute> getAttributes(); AbstractAttribute getAttributeByName(final String attributeName); boolean removeAttributes(final AbstractAttribute... attributes); boolean removeAttributes(final Object accessObject,
            final boolean invokeListener,
            final AbstractAttribute... attributes); boolean removeAttributes(final boolean updateClient,
            final AbstractAttribute... attributes); boolean removeAttributes(final String... attributeNames); boolean removeAttributes(final Object accessObject,
            final boolean invokeListener, final String... attributeNames); boolean removeAttributes(final boolean updateClient,
            final String... attributeNames); AbstractHtml getParent(); @Deprecated void setParent(final AbstractHtml parent); List<AbstractHtml> getChildren(); Set<AbstractHtml> getChildren(final Object accessObject); void setChildren(final Set<AbstractHtml> children); AbstractHtml[] getChildrenAsArray(); AbstractHtml getFirstChild(); int getChildrenSize(); AbstractHtml getChildAt(final int index); int getIndexByChild(final AbstractHtml child); int getIndexByChild(final Object accessObject,
            final AbstractHtml child); boolean containsChild(final AbstractHtml childTag); final String getOpeningTag(); String getClosingTag(); String toBigHtmlString(); String toBigHtmlString(final boolean rebuild); int toBigOutputStream(final OutputStream os); int toBigOutputStream(final OutputStream os, final Charset charset); int toBigOutputStream(final OutputStream os, final String charset); int toBigOutputStream(final OutputStream os, final boolean rebuild); int toBigOutputStream(final OutputStream os, final boolean rebuild,
            final Charset charset); int toBigOutputStream(final OutputStream os, final boolean rebuild,
            final String charset); @Override String toHtmlString(); @Override String toHtmlString(final Charset charset); @Override String toHtmlString(final String charset); @Override String toHtmlString(final boolean rebuild); @Override String toHtmlString(final boolean rebuild, final Charset charset); @Override String toHtmlString(final boolean rebuild, final String charset); int toOutputStream(final OutputStream os); int toOutputStream(final OutputStream os, final Charset charset); int toOutputStream(final OutputStream os, final Charset charset,
            final boolean flushOnWrite); int toOutputStream(final OutputStream os, final String charset); int toOutputStream(final OutputStream os, final boolean rebuild); int toOutputStream(final OutputStream os, final boolean rebuild,
            final boolean flushOnWrite); int toOutputStream(final OutputStream os, final boolean rebuild,
            final Charset charset); int toOutputStream(final OutputStream os, final boolean rebuild,
            final Charset charset, final boolean flushOnWrite); int toOutputStream(final OutputStream os, final boolean rebuild,
            final String charset); @Override String toString(); String getTagName(); byte[][] getAttributeHtmlBytesCompressedByIndex(
            final boolean rebuild, final Charset charset); @Override final AbstractHtml5SharedObject getSharedObject(); boolean isHtmlStartSBAsFirst(); @Override AbstractHtml clone(); AbstractHtml clone(final String... excludeAttributes); Charset getCharset(); void setCharset(final Charset charset); byte[] toWffBMBytes(); byte[] toWffBMBytes(final String charset); byte[] toWffBMBytes(final Charset charset); byte[] toCompressedWffBMBytes(final Charset charset); byte[] toCompressedWffBMBytesV2(final Charset charset); static AbstractHtml getTagFromWffBMBytes(
            final byte[] bmMessageBytes); static AbstractHtml getTagFromWffBMBytes(final byte[] bmBytes,
            final String charset); static AbstractHtml getTagFromWffBMBytes(final byte[] bmBytes,
            final Charset charset); static AbstractHtml getExactTagFromWffBMBytes(final byte[] bmBytes,
            final Charset charset); DataWffId getDataWffId(); void setDataWffId(final DataWffId dataWffId); boolean insertBefore(final AbstractHtml... abstractHtmls); boolean replaceWith(final AbstractHtml... tags); boolean insertAfter(final AbstractHtml... abstractHtmls); Map<String, WffBMData> getWffObjects(); AbstractHtml getRootTag(); Object getSharedData(); void setSharedData(final Object sharedData); boolean setSharedDataIfNull(final Object sharedData); final void resetHierarchy(); @SuppressWarnings("unchecked") T give(final Consumer<T> consumer); @SuppressWarnings("unchecked") R give(
            final BiFunction<R, I, R> consumer, final I input);  }
@Test public void testGive() { Div rootDiv = new Div(null, new Id("rootDivId")).<Div> give(parent -> { new Div(parent, new Id("parentDivId")).give(nestedTag1 -> { new Div(nestedTag1, new Id("child1")); new Div(nestedTag1, new Id("child2")); new Div(nestedTag1, new Id("child3")); }); }); assertEquals( "<div id=\"rootDivId\"><div id=\"parentDivId\"><div id=\"child1\"></div><div id=\"child2\"></div><div id=\"child3\"></div></div></div>", rootDiv.toHtmlString()); }