| Constructor and Description |
|---|
Node(TagNode parent)
This constructor not only sets the parameter as the parent for the
created node, but also appends the created node to the collection
of the parent's children.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Node |
copyTree() |
void |
detectIgnorableWhiteSpace() |
LastCommonParentResult |
getLastCommonParent(Node other)
Descent the ancestors list for both nodes stopping either
at the first no-match case or when either of the lists is exhausted.
|
abstract Node |
getLeftMostChild() |
abstract List<Node> |
getMinimalDeletedSet(long id) |
TagNode |
getParent() |
List<TagNode> |
getParentTree()
This method returns a list of the ancestors
that is ordered starting from the root by the depth.
|
abstract Node |
getRightMostChild() |
TagNode |
getRoot()
"equals" method should work differently for
the case where the compared nodes are from the same tree,
and in that case return true only if it's the same object
This method returns the root of the tree (which should be
common ancestor for every node in the tree).
|
boolean |
inPre() |
boolean |
isWhiteAfter() |
boolean |
isWhiteBefore() |
void |
setParent(TagNode parent)
changes the parent field of this node.
|
protected void |
setRoot(TagNode root) |
void |
setWhiteAfter(boolean whiteAfter) |
void |
setWhiteBefore(boolean whiteBefore) |
protected TagNode parent
public Node(TagNode parent)
parent - - the parent for the new node.public TagNode getParent()
public List<TagNode> getParentTree()
List<TagNode> if the parent is null.public TagNode getRoot()
TagNodeTagNodepublic void detectIgnorableWhiteSpace()
public LastCommonParentResult getLastCommonParent(Node other)
other - - the node to check for common parentIllegalArgumentException - if the parameter is nullpublic void setParent(TagNode parent)
parent - - new parent to assignprotected void setRoot(TagNode root)
public abstract Node copyTree()
public boolean inPre()
true only if one of the ancestors is
<pre> tag. false otherwise (including case
where this node is <pre> tag)public boolean isWhiteBefore()
public void setWhiteBefore(boolean whiteBefore)
public boolean isWhiteAfter()
public void setWhiteAfter(boolean whiteAfter)
public abstract Node getLeftMostChild()
public abstract Node getRightMostChild()
Copyright © 2022. All rights reserved.