All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.jdom.Comment
Comment
defines behavior for an XML
comment, modeled in Java. Methods
allow the user to obtain the text of the comment.
Comment
Default, no-args constructor for implementations to use if needed.
This creates the comment with the supplied text.
This will return a clone of this Comment
.
This detaches the Comment
from its parent, or does
nothing if the Comment
has no parent.
This tests for equality of this Comment
to the supplied
Object
.
This retrieves the owning
This will return the parent of this
This returns the textual data within the
This returns the hash code for this
This sets the
This will set the parent of this
This will set the value of the
This returns a {
getParent()
Comment
.
getText()
Comment
.
hashCode()
Comment
.
setDocument(Document)
{
setParent(Element)
Comment
.
setText(String)
Comment
.
toString()
String
representation of the
Comment
, suitable for debugging.
protected String text
Comment
protected Object parent
protected Comment()
Default, no-args constructor for implementations to use if needed.
public Comment(String text)
This creates the comment with the supplied text.
String
content of comment.
public Element getParent()
This will return the parent of this Comment
.
If there is no parent, then this returns null
.
Comment
protected Comment setParent(Element parent)
This will set the parent of this Comment
.
Element
to be new parent.
Comment
modified.
public Comment detach()
This detaches the Comment
from its parent, or does
nothing if the Comment
has no parent.
Comment
- this
Comment
modified.
public Document getDocument()
This retrieves the owning {@link Document}
for
this Comment, or null if not a currently a member of a
{@link Document}
.
Document
owning this Element, or null.
protected Comment setDocument(Document document)
This sets the {@link Document}
parent of this comment.
Document
parent
Comment
modified
public String getText()
This returns the textual data within the
Comment
.
String
- text of comment.
public Comment setText(String text)
This will set the value of the Comment
.
String
text for comment.
Comment
- this Comment modified.
public String toString()
This returns a String
representation of the
Comment
, suitable for debugging. If the XML
representation of the Comment
is desired,
{@link org.jdom.output.XMLOutputter#outputString(Comment)}
should be used.
String
- information about the
Attribute
public final boolean equals(Object ob)
This tests for equality of this Comment
to the supplied
Object
.
Object
to compare to.
boolean
- whether the Comment
is
equal to the supplied Object
.
public final int hashCode()
This returns the hash code for this Comment
.
int
- hash code.
public Object clone()
This will return a clone of this Comment
.
Object
- clone of this Comment
.
All Packages Class Hierarchy This Package Previous Next Index