Main Page   Packages   Namespace List   Class Hierarchy   Compound List   Compound Members  

Comment Class Reference

List of all members.

Public Methods

 Comment (String text)
Element getParent ()
Comment detach ()
Document getDocument ()
String getText ()
Comment setText (String text)
String toString ()
final boolean equals (Object ob)
final int hashCode ()
Object clone ()

Protected Methods

 Comment ()
Comment setParent (Element parent)
Comment setDocument (Document document)

Protected Attributes

String text
Object parent

Detailed Description

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

Author:
Brett McLaughlin , Jason Hunter
Version:
Revision:
1.20
,
Date:
2002/02/12 06:34:09


Constructor & Destructor Documentation

Comment::Comment   [inline, protected]
 

Default, no-args constructor for implementations to use if needed.

Comment::Comment String    text [inline]
 

This creates the comment with the supplied text.

Parameters:
text  String content of comment.


Member Function Documentation

Object Comment::clone   [inline]
 

This will return a clone of this Comment.

Returns:
Object - clone of this Comment.

Comment Comment::detach   [inline]
 

This detaches the Comment from its parent, or does nothing if the Comment has no parent.

Returns:
Comment - this Comment modified.

final boolean Comment::equals Object    ob [inline]
 

This tests for equality of this Comment to the supplied Object.

Parameters:
ob  Object to compare to.
Returns:
boolean - whether the Comment is equal to the supplied Object.

Document Comment::getDocument   [inline]
 

This retrieves the owning Document for this Comment, or null if not a currently a member of a Document.

Returns:
Document owning this Element, or null.

Element Comment::getParent   [inline]
 

This will return the parent of this Comment. If there is no parent, then this returns null.

Returns:
parent of this Comment

String Comment::getText   [inline]
 

This returns the textual data within the Comment.

Returns:
String - text of comment.

final int Comment::hashCode   [inline]
 

This returns the hash code for this Comment.

Returns:
int - hash code.

Comment Comment::setDocument Document    document [inline, protected]
 

This sets the Document parent of this comment.

Parameters:
document  Document parent
Returns:
this Comment modified

Comment Comment::setParent Element    parent [inline, protected]
 

This will set the parent of this Comment.

Parameters:
parent  Element to be new parent.
Returns:
this Comment modified.

Comment Comment::setText String    text [inline]
 

This will set the value of the Comment.

Parameters:
text  String text for comment.
Returns:
Comment - this Comment modified.
Exceptions:
IllegalDataException  if the given text is invalid for a Comment.

String Comment::toString   [inline]
 

This returns a String representation of the Comment, suitable for debugging. If the XML representation of the Comment is desired, XMLOutputter::outputString should be used.

Returns:
String - information about the Attribute


Member Data Documentation

Object Comment::parent [protected]
 

Parent element, document, or null if none

String Comment::text [protected]
 

Text of the Comment


The documentation for this class was generated from the following file:
Generated on Sat Mar 30 18:53:03 2002 for JDOM by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001