|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.ptalon.NamedTree<TreeType>
public abstract class NamedTree<TreeType extends NamedTree>
This class is used for generic trees, where each node has a name. Subclasses will typically should set TreeType to be the subclass itself. For instance, IfTree extends NamedTree < IfTree >
Red (celaine) |
Red (celaine) |
Field Summary | |
---|---|
protected java.util.List<TreeType> |
_children
The children of this tree. |
protected java.lang.String |
_name
The name of this tree. |
protected TreeType |
_parent
The parent of this tree. |
Constructor Summary | |
---|---|
NamedTree(TreeType parent,
java.lang.String name)
Create a new tree with the specified parent. |
Method Summary | |
---|---|
abstract TreeType |
addChild(java.lang.String name)
Create a new child tree to this tree with the specified name and return it. |
TreeType |
getChild(java.lang.String name)
Returns the child with the specified name. |
java.util.List<TreeType> |
getChildren()
Returns the children of this tree. |
java.lang.String |
getName()
Returns the name associated with this tree. |
TreeType |
getParent()
Returns the parent of this tree. |
java.util.List<TreeType> |
getProperAncestors()
Return the ancestors of this tree, not including this tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TreeType extends NamedTree _parent
protected java.util.List<TreeType extends NamedTree> _children
protected java.lang.String _name
Constructor Detail |
---|
public NamedTree(TreeType parent, java.lang.String name)
parent
- The parent for this tree.name
- The name for this tree.Method Detail |
---|
public abstract TreeType addChild(java.lang.String name)
name
- The name of the child.
public TreeType getChild(java.lang.String name)
name
- The name for the desired child.
public java.util.List<TreeType> getChildren()
public java.lang.String getName()
public TreeType getParent()
public java.util.List<TreeType> getProperAncestors()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |