|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Element
An element represents a portion of a StructuredDocument
. An element
is identifiable by a key
and may also optionally have a
value
. Each Element also maintains a collection of references
to other elements, its
StructuredDocument
. A StructuredDocument
is a specialized
form of Element with additional features that make it appropriate for
acting as the root of a hierarchy of elements.
Document
,
StructuredDocument
,
StructuredDocumentFactory
,
StructuredTextDocument
,
TextElement
Method Summary | |
---|---|
void |
appendChild(Element element)
Add a child element to this element. |
Enumeration |
getChildren()
Returns an enumeration of the immediate children of this element. |
Enumeration |
getChildren(Object key)
Returns an enumeration of the immediate children of this element whose name match the specified key. |
Object |
getKey()
Get the key associated with this Element. |
Element |
getParent()
Get the parent element of this element. |
StructuredDocument |
getRoot()
Get the root Element of the hierarchy this Element belongs to. |
Object |
getValue()
Get the value (if any) associated with this Element. |
Method Detail |
---|
Object getKey()
Object getValue()
StructuredDocument getRoot()
Element getParent()
null
is returned. If this
element is the root element of the Document then it returns itself. ie.,
this == this.getParent()
.
void appendChild(Element element)
element
- the element to be added as a childEnumeration getChildren()
Enumeration getChildren(Object key)
key
- The key which will be matched against.
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |