/** * Appends the given {@code htmls} as this element's content, in sequence. * * @throws IllegalStateException if this builder represents a void element */ public SafeHtmlBuilder appendContent(SafeHtml... htmls) { checkNotVoidElement(); Collections.addAll(contents, htmls); return this; }
/** * Appends the given {@code htmls} as this element's content, in the sequence the Iterable returns * them. * * @throws IllegalStateException if this builder represents a void element */ public SafeHtmlBuilder appendContent(Iterable<SafeHtml> htmls) { checkNotVoidElement(); for (SafeHtml html : htmls) { contents.add(html); } return this; }
/** * Appends the given {@code htmls} as this element's content, in the sequence the Iterator returns * them. * * @throws IllegalStateException if this builder represents a void element */ public SafeHtmlBuilder appendContent(Iterator<SafeHtml> htmls) { checkNotVoidElement(); while (htmls.hasNext()) { contents.add(htmls.next()); } return this; }