AbstractContentNode, Elementpublic abstract class AbstractChild extends java.lang.Object implements Child
ANY_NODE, IS_COMMENT, IS_ELEMENT, IS_EMPTY_ELEMENT, IS_IGNORABLE_TEXT, IS_TEXT| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractChild() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract AbstractChild |
clone(boolean recurse) |
Return a clone of this node.
|
Document |
getDocument() |
|
int |
getIndex() |
|
Parent |
getParent() |
|
Child |
getRootChild() |
Returns the highest ancestor of this child that is a child.
|
Element |
getRootElement() |
Returns the root element of this node.
|
void |
remove() |
Detach this child from its parent.
|
protected void |
resetParent() |
|
void |
setIndex(int to) |
Set the index of this child.
|
void |
setParent(Parent parent) |
Sets or changes the parent of this child.
|
java.lang.String |
toString() |
deepEquals, getTypepublic abstract AbstractChild clone(boolean recurse)
Nodepublic final Child getRootChild()
ChildThis may be this child.
getRootChild in interface Childpublic final Document getDocument()
getDocument in interface Nodepublic final Element getRootElement()
Node
If this node is a document, then this is its unique child element, possibly null.
If this node is a child, then this is the highest ancestor that is an element, possibly null.
getRootElement in interface Nodepublic final Parent getParent()
protected void resetParent()
public final void setParent(Parent parent)
Childpublic int getIndex()
public void setIndex(int to)
Childpublic final void remove()
Child
Equivalent to setParent(null).
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.