Package cdc.util.data
Class Comment
- java.lang.Object
-
- cdc.util.data.AbstractChild
-
- cdc.util.data.AbstractContentNode
-
- cdc.util.data.Comment
-
public final class Comment extends AbstractContentNode
Comment node.It has a text content and can be attached to a Document or Element.
- Author:
- Damien Carbonne
-
-
Field Summary
-
Fields inherited from interface cdc.util.data.Node
ANY_NODE, ELEMENT_NAME_AND_ATTRIBUTES_COMPARATOR, ELEMENT_NAME_COMPARATOR, IS_COMMENT, IS_ELEMENT, IS_IGNORABLE_TEXT, IS_PURE_ELEMENT, IS_TEXT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommentappendContent(char[] str, int offset, int len)CommentappendContent(CharSequence cs, int start, int end)CommentappendContent(String content)CommentclearContent()Commentclone(boolean recurse)Return a clone of this node.StringgetQName()NodeTypegetType()CommentsetContent(String content)CommentsetIndex(int to)Set the index of this child.CommentsetParent(Parent parent)Sets or changes the parent of this child.-
Methods inherited from class cdc.util.data.AbstractContentNode
deepEquals, getContent
-
Methods inherited from class cdc.util.data.AbstractChild
equals, getDocument, getParent, getRootElement, hashCode, resetParent, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cdc.util.data.Child
detach, getIndex, getParent, getParent, getRootChild
-
Methods inherited from interface cdc.util.data.Node
getDocument, getRootElement
-
-
-
-
Method Detail
-
getType
public NodeType getType()
- Returns:
- The node type.
-
clone
public Comment clone(boolean recurse)
Description copied from interface:NodeReturn a clone of this node.
-
getQName
public String getQName()
- Returns:
- A string representation of this node. May be used for debug.
-
setParent
public Comment setParent(Parent parent)
Description copied from interface:ChildSets or changes the parent of this child.- Specified by:
setParentin interfaceChild- Overrides:
setParentin classAbstractChild- Parameters:
parent- The new parent. May benull.- Returns:
- This object.
-
setIndex
public Comment setIndex(int to)
Description copied from interface:ChildSet the index of this child.- Parameters:
to- The new index of this child.- Returns:
- This object.
-
setContent
public Comment setContent(String content)
- Overrides:
setContentin classAbstractContentNode
-
clearContent
public Comment clearContent()
- Overrides:
clearContentin classAbstractContentNode
-
appendContent
public Comment appendContent(String content)
- Overrides:
appendContentin classAbstractContentNode
-
appendContent
public Comment appendContent(CharSequence cs, int start, int end)
- Overrides:
appendContentin classAbstractContentNode
-
appendContent
public Comment appendContent(char[] str, int offset, int len)
- Overrides:
appendContentin classAbstractContentNode
-
-