All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.jdom.Text
Text
represents character-based content within an
XML document represented by JDOM. It is intended to provide a modular,
perantable method of representing that text. Additionally,
Text
makes no guarantees about the underlying textual
representation of character data, but does expose that data as a Java
String
.
Text
node's parent.
This is the protected, no-args constructor standard in all JDOM classes.
This constructor creates a new Text
node, with the
supplied value as it's character content.
This will append character content to whatever content already
exists within this Text
node.
This will return a clone of this Text
node, with the
same character content, but no parent.
This tests for equality of this Text
to the supplied
Object
, explicitly using the == operator.
This retrieves the owning This will return the parent of this This returns the value of this This will generate a hash code for this node. This will set the value of this This returns a {
getParent()
Text
node, which
is always a JDOM {
getValue()
Text
node as a Java
String
.
hashCode()
setValue(String)
Text
node.
toString()
String
representation of the
Text
node, suitable for debugging.
protected StringBuffer value
protected Element parent
Text
node's parent.
protected Text()
This is the protected, no-args constructor standard in all JDOM classes. It allows subclassers to get a raw instance with no initialization.
public Text(String stringValue)
This constructor creates a new Text
node, with the
supplied value as it's character content.
public String getValue()
This returns the value of this Text
node as a Java
String
.
String
- character content of this node.
public void setValue(String stringValue)
This will set the value of this Text
node.
public void append(String stringValue)
This will append character content to whatever content already
exists within this Text
node.
public Element getParent()
This will return the parent of this Text
node, which
is always a JDOM {@link Element}
.
Element
- this node's parent.
public Document getDocument()
This retrieves the owning {@link Document}
for
this Text, or null if not a currently a member of a
{@link Document}
.
Document
owning this Text, or null.
public String toString()
This returns a String
representation of the
Text
node, suitable for debugging. If the XML
representation of the Text
node is desired,
either {@link #getValue}
or
{@link org.jdom.output.XMLOutputter#output(Text, Writer)}
should be used.
String
- information about this node.
public final int hashCode()
This will generate a hash code for this node.
int
- hash code for this node.
public Object clone()
This will return a clone of this Text
node, with the
same character content, but no parent.
Text
- cloned node.
public final boolean equals(Object ob)
This tests for equality of this Text
to the supplied
Object
, explicitly using the == operator.
Object
to compare to
Text
nodes are equal
All Packages Class Hierarchy This Package Previous Next Index