org::jdom::Comment Class Reference

List of all members.

Public Member Functions

 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 Member Functions

 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.26
,
Date
2003/04/06 02:00:44


Constructor & Destructor Documentation

org::jdom::Comment::Comment (  )  [inline, protected]

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

org::jdom::Comment::Comment ( String  text  )  [inline]

This creates the comment with the supplied text.

Parameters:
text String content of comment.


Member Function Documentation

Element org::jdom::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

Comment org::jdom::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 org::jdom::Comment::detach (  )  [inline]

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

Returns:
Comment - this Comment modified.

Document org::jdom::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.

Comment org::jdom::Comment::setDocument ( Document  document  )  [inline, protected]

This sets the Document parent of this comment.

Parameters:
document Document parent
Returns:
this Comment modified

String org::jdom::Comment::getText (  )  [inline]

This returns the textual data within the Comment.

Returns:
String - text of comment.

Comment org::jdom::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 illegal for a Comment.

String org::jdom::Comment::toString (  )  [inline]

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.

Returns:
String - information about the Attribute

final boolean org::jdom::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.

final int org::jdom::Comment::hashCode (  )  [inline]

This returns the hash code for this Comment.

Returns:
int - hash code.

Object org::jdom::Comment::clone (  )  [inline]

This will return a clone of this Comment.

Returns:
Object - clone of this Comment.


Member Data Documentation

String org::jdom::Comment::text [protected]

Text of the Comment

Object org::jdom::Comment::parent [protected]

Parent element, document, or null if none


The documentation for this class was generated from the following file:
Generated on Sun Nov 5 16:02:37 2006 for JDOM by  doxygen 1.5.1