org.jdom
public class Comment extends Content
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
text
Text of the
Comment |
Modifier | Constructor and Description |
---|---|
protected |
Comment()
Default, no-args constructor for implementations to use if needed.
|
|
Comment(java.lang.String text)
This creates the comment with the supplied text.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getText()
This returns the textual data within the
Comment . |
java.lang.String |
getValue()
Returns the XPath 1.0 string value of this element, which is the
text of this comment.
|
Comment |
setText(java.lang.String text)
This will set the value of the
Comment . |
java.lang.String |
toString()
This returns a
String representation of the
Comment , suitable for debugging. |
clone, detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
protected Comment()
public Comment(java.lang.String text)
text
- String
content of comment.public java.lang.String getValue()
public java.lang.String getText()
Comment
.String
- text of comment.public Comment setText(java.lang.String text)
Comment
.text
- String
text for comment.Comment
- this Comment modified.IllegalDataException
- if the given text is illegal for a
Comment.public java.lang.String toString()
String
representation of the
Comment
, suitable for debugging. If the XML
representation of the Comment
is desired,
XMLOutputter.outputString(Comment)
should be used.toString
in class java.lang.Object
String
- information about the
Attribute
Copyright © 2007 Jason Hunter, Brett McLaughlin. All Rights Reserved.