public final class Comment extends AbstractContentNode
It has a text content and can be attached to a Document or Element.
ANY_NODE, IS_COMMENT, IS_ELEMENT, IS_EMPTY_ELEMENT, IS_IGNORABLE_TEXT, IS_TEXT| Constructor | Description |
|---|---|
Comment() |
|
Comment(Comment other) |
|
Comment(Parent parent) |
|
Comment(Parent parent,
java.lang.String content) |
|
Comment(java.lang.String content) |
| Modifier and Type | Method | Description |
|---|---|---|
Comment |
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.
|
boolean |
equals(java.lang.Object object) |
|
NodeType |
getType() |
|
int |
hashCode() |
getDocument, getIndex, getParent, getRootChild, getRootElement, remove, resetParent, setIndex, setParent, toStringappendContent, appendContent, appendContent, clearContent, getContent, setContentgetIndex, getParent, getParent, getRootChild, remove, setIndex, setParentgetDocument, getRootElementpublic Comment()
public Comment(Parent parent)
public Comment(java.lang.String content)
public Comment(Parent parent, java.lang.String content)
public Comment(Comment other)
public NodeType getType()
public Comment clone(boolean recurse)
Nodepublic boolean deepEquals(Node node)
NodeParents are ignored.
node - The other node to compare.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.ObjectCopyright © 2018. All rights reserved.