java.lang.Object
org.jdom.Content
org.jdom.Comment
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class Comment
- extends Content
An XML comment. Methods allow the user to get and set the text of the
comment.
- Version:
- $Revision: 1.32 $, $Date: 2004/02/11 21:12:43 $
|
Constructor Summary |
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. |
CVS_ID
private static final java.lang.String CVS_ID
- See Also:
- Constant Field Values
text
protected java.lang.String text
- Text of the
Comment
Comment
protected Comment()
- Default, no-args constructor for implementations to use if needed.
Comment
public Comment(java.lang.String text)
- This creates the comment with the supplied text.
getValue
public java.lang.String getValue()
- Returns the XPath 1.0 string value of this element, which is the
text of this comment.
- Specified by:
getValue in class Content
getText
public java.lang.String getText()
- This returns the textual data within the
Comment.
setText
public Comment setText(java.lang.String text)
- This will set the value of the
Comment.
toString
public java.lang.String toString()
- This returns a
String representation of the
Comment, suitable for debugging. If the XML
representation of the Comment is desired,
org.jdom.output.XMLOutputter#outputString(Comment)
should be used.