ANY_NODE, IS_COMMENT, IS_ELEMENT, IS_EMPTY_ELEMENT, IS_IGNORABLE_TEXT, IS_TEXT| Constructor | Description |
|---|---|
Document() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
addChild(Child child) |
Add a child to this parent, if possible.
|
boolean |
canAddChild(Child child) |
Returns true when a child can be added.
|
void |
clearChildren() |
Removes all children.
|
Document |
clone(boolean recurse) |
Return a clone of this node.
|
boolean |
deepEquals(Node node) |
Return true when this node and its descendants equals other node hierarchy.
|
void |
ensureChildren() |
|
java.util.List<AbstractChild> |
getChildren() |
|
Document |
getDocument() |
|
Element |
getRootElement() |
|
NodeType |
getType() |
|
boolean |
removeChild(Child child) |
Remove a child.
|
AbstractChild |
removeChildAt(int index) |
Remove the child located at a given index.
|
boolean |
supportsChildType(NodeType type) |
Returns true when this node supports a child of a given type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildAt, getChildren, getChildren, getChildrenCount, getChildrenCount, getLastChild, hasChildrenpublic Document clone(boolean recurse)
Nodepublic boolean deepEquals(Node node)
NodeParents are ignored.
deepEquals in interface Nodenode - The other node to compare.public Document getDocument()
getDocument in interface Nodepublic Element getRootElement()
getRootElement in interface Nodepublic boolean supportsChildType(NodeType type)
ParentsupportsChildType in interface Parenttype - The type.public boolean canAddChild(Child child)
ParentcanAddChild in interface Parentchild - The childpublic void ensureChildren()
ensureChildren in interface Parentpublic java.util.List<AbstractChild> getChildren()
getChildren in interface Parentpublic boolean addChild(Child child)
ParentIf possible, child current parent is changed to this node.
public boolean removeChild(Child child)
ParentIf child is not a child of this parent, then false is returned.
removeChild in interface Parentchild - The child.public AbstractChild removeChildAt(int index)
ParentIf index is invalid, returns false.
removeChildAt in interface Parentindex - The index.public void clearChildren()
ParentclearChildren in interface ParentCopyright © 2018. All rights reserved.