|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| Field Summary | |
protected Element |
parent
This Text node's parent. |
protected StringBuffer |
value
The actual character content |
| Constructor Summary | |
protected |
Text()
This is the protected, no-args constructor standard in all JDOM classes. |
|
Text(String stringValue)
This constructor creates a new Text node, with the
supplied value as it's character content. |
| Method Summary | |
void |
append(String stringValue)
This will append character content to whatever content already exists within this Text node. |
Object |
clone()
This will return a clone of this Text node, with the
same character content, but no parent. |
boolean |
equals(Object ob)
This tests for equality of this Text to the supplied
Object, explicitly using the == operator. |
Document |
getDocument()
This retrieves the owning for
this Text, or null if not a currently a member of a
. |
Element |
getParent()
This will return the parent of this Text node, which
is always a JDOM . |
String |
getValue()
This returns the value of this Text node as a Java
String. |
int |
hashCode()
This will generate a hash code for this node. |
void |
setValue(String stringValue)
This will set the value of this Text node. |
String |
toString()
This returns a String representation of the
Text node, suitable for debugging. |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected StringBuffer value
protected Element parent
Text node's parent.| Constructor Detail |
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.
stringValue - the node's character content.| Method Detail |
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.
stringValue - value for node's content.public void append(String stringValue)
This will append character content to whatever content already
exists within this Text node.
stringValue - character content to append.public Element getParent()
This will return the parent of this Text node, which
is always a JDOM .Element
Element - this node's parent.public Document getDocument()
This retrieves the owning for
this Text, or null if not a currently a member of a
Document.
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 or
getValue()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.
ob - Object to compare toText nodes are equal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||