|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.init.its.process.support.ItsTree<T>
T
- public class ItsTree<T extends Element>
tree data structure implementation
Field Summary | |
---|---|
protected java.util.List<ItsTree<T>> |
children
|
protected static java.lang.String |
EOL
|
protected T |
head
|
protected java.util.Map<T,ItsTree<T>> |
mapping
|
protected ItsTree<T> |
next
|
protected ItsTree<T> |
parent
|
Constructor Summary | |
---|---|
ItsTree(T head)
Creates a new Tree with an head element |
Method Summary | |
---|---|
java.util.Deque<ItsTree<T>> |
findAllByName(java.lang.String prefix,
java.lang.String name)
Returns a list of all Elements specified by name an prefix. |
ItsTree<T> |
findByName(java.lang.String prefix,
java.lang.String name)
Returns the first Element, that is matched by prefix and the name |
java.util.List<ItsTree<T>> |
getChildren()
Returns the children of this node |
T |
getHead()
Returns the head of this node |
ItsTree<T> |
getParent()
Returns the parent of this node |
java.util.Collection<T> |
getSuccessors()
returns the successive elements of this node |
java.util.Collection<T> |
getSuccessors(T root)
returns the successors ofthe root element |
boolean |
hasChildren()
Returns true, if this subtree contains children |
boolean |
hasNextSibling()
Returns true, if it has a next sibling |
ItsTree<T> |
insert(ItsTree<T> tree)
Inserts a subtree as a child to this node |
ItsTree<T> |
insert(T node)
Inserts an element as child to this tree and returns the child subtree |
ItsTree<T> |
insert(T parent,
T node)
Inserts an element as child for the parent and returns the child subtree |
boolean |
isEmpty()
Returns true, if the head of this tree is empty (eg. null) |
ItsTree<T> |
nextSibling()
Returns the next sibling |
java.lang.String |
print()
prints the tree with an intendation level |
ItsTree<T> |
remove(T node)
Removes a node form the tree and returns the subtree |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ItsTree<T extends Element> parent
protected ItsTree<T extends Element> next
protected T extends Element head
protected java.util.List<ItsTree<T extends Element>> children
protected java.util.Map<T extends Element,ItsTree<T extends Element>> mapping
protected static final java.lang.String EOL
Constructor Detail |
---|
public ItsTree(T head)
head
- Method Detail |
---|
public ItsTree<T> insert(T parent, T node)
parent
- node
-
public ItsTree<T> insert(T node)
node
-
public ItsTree<T> insert(ItsTree<T> tree)
tree
- the tree to insert at this node
public ItsTree<T> remove(T node)
node
-
public T getHead()
public ItsTree<T> getParent()
public java.util.List<ItsTree<T>> getChildren()
public boolean hasChildren()
public java.util.Collection<T> getSuccessors()
public java.util.Collection<T> getSuccessors(T root)
root
-
public boolean isEmpty()
public java.util.Deque<ItsTree<T>> findAllByName(java.lang.String prefix, java.lang.String name)
prefix
- the namespace prefix of the elements to look forname
- the name of the elements to look for
public ItsTree<T> findByName(java.lang.String prefix, java.lang.String name)
prefix
- the namespace prefix of the Elementname
- the elements name
public ItsTree<T> nextSibling()
public boolean hasNextSibling()
public java.lang.String print()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |