|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectTreeElement
Represents a node in an object tree. Each node can have child nodes and attached objects. Usually a node is created for every element in the origin XML document.
Method Summary | ||
---|---|---|
void |
addObject(Object object)
Attaches the given object to this node. |
|
Collection<? extends ObjectTreeElement> |
getChildren()
Returns all children of this node. |
|
Collection<Object> |
getObjects()
Returns objects attached directly to this node. |
|
|
getObjectsOfType(Class<? extends T> type)
Returns objects of specified type attached directly to this node. |
|
|
getObjectsOfTypeFromSubTree(Class<? extends T> type)
Returns objects attached to this node and all child nodes (recursively). |
|
|
getObjectsOfTypeFromTopTree(Class<? extends T> type)
Returns objects attached to this node and all parent nodes up to the root node of the tree. |
|
ObjectTreeElement |
getParent()
Returns the parent of this node. |
|
ObjectTreeElement |
getRoot()
Returns the root node of the tree this node belongs to. |
|
boolean |
removeObject(Object object)
Removes a object from this node. |
Method Detail |
---|
ObjectTreeElement getParent()
null
if this is
the root nodeObjectTreeElement getRoot()
Collection<? extends ObjectTreeElement> getChildren()
Collection<Object> getObjects()
<T> Collection<T> getObjectsOfType(Class<? extends T> type)
T
- type of wanted objectstype
- object type that is returned
<T> Collection<T> getObjectsOfTypeFromTopTree(Class<? extends T> type)
T
- type of wanted objectstype
- object type that is returned
<T> Collection<T> getObjectsOfTypeFromSubTree(Class<? extends T> type)
SubObjectTree
).
T
- type of wanted objectstype
- object type that is returned
void addObject(Object object)
object
- object to attachboolean removeObject(Object object)
object
- object to remove
true
if the specified object
was removed from this node, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |