Project JXTA

net.jxta.impl.document
Class TextElementCommon

java.lang.Object
  extended by net.jxta.impl.document.TextElementCommon
All Implemented Interfaces:
Element, TextElement
Direct Known Subclasses:
PlainTextElement, XMLElementCommon

public abstract class TextElementCommon
extends Object
implements TextElement

This class represent an element of a Text document. This class provides some common things needed by TextElement instances.


Constructor Summary
TextElementCommon()
           
 
Method Summary
 void appendChild(Element element)
          Add a child element to this element
 Enumeration getChildren(Object key)
          Returns an enumeration of the immediate children of this element whose name match the specified string.
 Object getKey()
          Get the name associated with an element.
 Object getValue()
          Get the value (if any) associated with an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.jxta.document.TextElement
appendChild, getChildren, getName, getTextValue
 
Methods inherited from interface net.jxta.document.Element
getChildren, getParent, getRoot
 

Constructor Detail

TextElementCommon

public TextElementCommon()
Method Detail

appendChild

public void appendChild(Element element)
Add a child element to this element

Specified by:
appendChild in interface Element
Parameters:
element - the element to be added as a child

getChildren

public Enumeration getChildren(Object key)
Returns an enumeration of the immediate children of this element whose name match the specified string.

Specified by:
getChildren in interface Element
Parameters:
key - The key which will be matched against.
Returns:
enumeration containing all of the children of this element.

getKey

public Object getKey()
Get the name associated with an element.

Specified by:
getKey in interface Element
Returns:
A string containing the key of this element.

getValue

public Object getValue()
Get the value (if any) associated with an element.

Specified by:
getValue in interface Element
Returns:
A string containing the value of this element, if any, otherwise null.

JXTA J2SE