|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jasi.sim.basic.tree.AbstractNode<T> jasi.sim.basic.tree.SetNode<T>
T
- Content type of node.public final class SetNode<T>
A node class, where children must possess different IDs.
Constructor Summary | |
---|---|
SetNode()
Create a root node with no leafs and no content. |
|
SetNode(T content)
Create a root node with no leafs. |
Method Summary | |
---|---|
AbstractNode<T> |
add(AbstractNode<T> child)
Add a node as child to this node. |
java.util.Collection<AbstractNode<T>> |
getChildren()
Get all children of this node. |
void |
remove(AbstractNode<T> child)
Remove a child node. |
java.util.Collection<AbstractNode<T>> |
remove(T content)
Remove a child node from this node. |
java.util.Collection<AbstractNode<T>> |
removeAll()
Remove a all children. |
int |
size()
Get the number of children nodes of this node. |
Methods inherited from class jasi.sim.basic.tree.AbstractNode |
---|
equals, findChildren, findRoot, getContent, getParent, has, hasChild, hashCode, hasParent, isLeafNode, isRootNode, printTree, printTree, setChildren, setContent, setParent, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SetNode()
public SetNode(T content)
content
- The node's content.Method Detail |
---|
public int size()
size
in class AbstractNode<T>
public AbstractNode<T> add(AbstractNode<T> child)
add
in class AbstractNode<T>
child
- The new child node.
public java.util.Collection<AbstractNode<T>> remove(T content)
remove
in class AbstractNode<T>
content
- The content of the child node.
public void remove(AbstractNode<T> child)
remove
in class AbstractNode<T>
child
- The child node.AbstractNode.remove(AbstractNode)
public java.util.Collection<AbstractNode<T>> removeAll()
removeAll
in class AbstractNode<T>
public java.util.Collection<AbstractNode<T>> getChildren()
getChildren
in class AbstractNode<T>
AbstractNode.getChildren()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |