@Override protected List<DomNode> computeElements() { final List<DomNode> response = new ArrayList<>(); for (final DomNode child : node.getChildren()) { response.add(child); } return response; } };
/** * Helper for getting code back from nodes. * @param builder the builder to write to * @param node the node to be serialized * @param html flag */ protected void printChildren(final StringBuilder builder, final DomNode node, final boolean html) { for (final DomNode child : node.getChildren()) { printNode(builder, child, html); } }
/** * Returns whether this node has any children. * @return boolean true if this node has any children, false otherwise */ public boolean jsxFunction_hasChildNodes() { return getDomNodeOrDie().getChildren().iterator().hasNext(); }
private void appendChildren(final DomNode node) { for (final DomNode child : node.getChildren()) { appendNode(child); } }
/** * Helper for getting code back from nodes. * @param builder the builder to write to * @param node the node to be serialized * @param html flag */ protected void printChildren(final StringBuilder builder, final DomNode node, final boolean html) { for (final DomNode child : node.getChildren()) { printNode(builder, child, html); } }
/** * Returns whether this node has any children. * @return boolean true if this node has any children, false otherwise */ public boolean jsxFunction_hasChildNodes() { return getDomNodeOrDie().getChildren().iterator().hasNext(); }
private void printChildren(final StringBuilder buffer, final DomNode node, final boolean html) { for (final DomNode child : node.getChildren()) { printNode(buffer, child, html); } }
/** * Iterate over all Children and call appendNode() for every. * * @param builder the StringBuilder to add to * @param node the node to process */ protected void appendChildren(final StringBuilder builder, final DomNode node) { for (final DomNode child : node.getChildren()) { appendNode(builder, child); } }
private void appendChildren(final DomNode node) { for (final DomNode child : node.getChildren()) { appendNode(child); } }
/** * Returns whether this node has any children. * @return boolean true if this node has any children, false otherwise */ public boolean jsxFunction_hasChildNodes() { return this.<DomNode>getDomNodeOrDie().getChildren().iterator().hasNext(); }
private void printChildren(final StringBuilder buffer, final DomNode node, final boolean html) { for (final DomNode child : node.getChildren()) { printNode(buffer, child, html); } }
/** * Lifecycle method invoked whenever a node is added to a document fragment. Intended to * be overridden by nodes which need to perform custom logic when they are * added to a fragment. This method is recursive, so if you override it, please * be sure to call <tt>super.onAddedToDocumentFragment()</tt>. */ protected void onAddedToDocumentFragment() { if (firstChild_ != null) { for (final DomNode child : getChildren()) { child.onAddedToDocumentFragment(); } } }
/** * Lifecycle method invoked whenever a node is added to a page. Intended to * be overridden by nodes which need to perform custom logic when they are * added to a page. This method is recursive, so if you override it, please * be sure to call <tt>super.onAddedToPage()</tt>. */ protected void onAddedToPage() { if (firstChild_ != null) { for (final DomNode child : getChildren()) { child.onAddedToPage(); } } }
/** * Recursively sets the new page on the node and its children * @param newPage the new owning page */ private void setPage(final SgmlPage newPage) { if (page_ == newPage) { return; // nothing to do } page_ = newPage; for (final DomNode node : getChildren()) { node.setPage(newPage); } }
/** * Removes all of this node's children. */ public void removeAllChildren() { if (getFirstChild() == null) { return; } for (final Iterator<DomNode> it = getChildren().iterator(); it.hasNext();) { it.next().removeAllChildren(); it.remove(); } }
/** * Removes all of this node's children. */ public void removeAllChildren() { if (getFirstChild() == null) { return; } for (final Iterator<DomNode> it = getChildren().iterator(); it.hasNext();) { it.next().removeAllChildren(); it.remove(); } }
/** * Removes all of this node's children. */ public void removeAllChildren() { if (getFirstChild() == null) { return; } for (final Iterator<DomNode> it = getChildren().iterator(); it.hasNext();) { it.next().removeAllChildren(); it.remove(); } }
/** * Provides a fast way to determine whether a node has children. * @return boolean {@code true} if this node has children */ @JsxFunction public boolean hasChildNodes() { final DomNode domNode = getDomNodeOrDie(); return domNode.getChildren().iterator().hasNext(); }
/** * Returns whether this node has any children. * @return boolean true if this node has any children, false otherwise */ @JsxFunction public boolean hasChildNodes() { return getDomNodeOrDie().getChildren().iterator().hasNext(); }
/** * Provides a fast way to determine whether a node has children. * @return boolean {@code true} if this node has children */ @JsxFunction public boolean hasChildNodes() { final DomNode domNode = getDomNodeOrDie(); return domNode.getChildren().iterator().hasNext(); }