org.jdom
Class Comment

java.lang.Object
  |
  +--org.jdom.Comment

public class Comment
extends java.lang.Object

Comment defines behavior for an XML comment, modeled in Java. Methods allow the user to obtain the text of the comment.

Version:
1.0
Author:
Brett McLaughlin, Jason Hunter

Field Summary
protected  java.lang.String text
          Text of the Comment
 
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.
 
Method Summary
 java.lang.String getText()
           This returns the textual data within the Comment.
 void setText(java.lang.String text)
           This will set the value of the Comment.
 java.lang.String toString()
           This returns the textual data within the Comment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

text

protected java.lang.String text
Text of the Comment
Constructor Detail

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.

Parameters:
text - String content of comment.
Method Detail

getText

public java.lang.String getText()

This returns the textual data within the Comment.

Returns:
String - text of comment.

setText

public void setText(java.lang.String text)

This will set the value of the Comment.

Parameters:
text - String text for comment.

toString

public java.lang.String toString()

This returns the textual data within the Comment.

Overrides:
toString in class java.lang.Object
Returns:
String - text of comment.


Copyright © 2000 Brett McLaughlin, Jason Hunter. All Rights Reserved.