|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.util.adt.ITreeNode
public class ITreeNode
A tree node simple structure, used in build utilities.
WARNING! This implementation is not thread safe
| Constructor Summary | |
|---|---|
ITreeNode(java.lang.Object obj)
|
|
| Method Summary | |
|---|---|
int |
addSon(java.lang.String name,
ITreeNode son)
Add a son to the current tree |
java.lang.String |
getName()
Get the name under which the current node exists |
java.lang.Object |
getObject()
Return the internal object hold by this node |
ITreeNode |
getParent()
Get the current parent, if any |
int |
getPosition()
Get the position of the current node in the sibling list |
ITreeNode |
getRoot()
Get the root node |
java.util.List<ITreeNode> |
getSiblings()
Get the sibling list |
ITreeNode |
getSon(java.lang.String name,
int pos)
Get the son at a given position. |
java.util.Collection<java.lang.String> |
getSonNames()
Get a List of the names in this ITreeNode |
java.util.List<ITreeNode> |
getSons(java.lang.String name)
Get the son values |
void |
removeSon(ITreeNode son)
Remove a son from the current tree |
java.util.Iterator<ITreeNode> |
sonIterator()
get the complete son iterator for this TreeNode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ITreeNode(java.lang.Object obj)
obj - THe maybe-null Object that this node holds| Method Detail |
|---|
public final java.lang.Object getObject()
public final ITreeNode getParent()
public final java.lang.String getName()
public final ITreeNode getRoot()
public final int addSon(java.lang.String name,
ITreeNode son)
name - A not-null name where the son will be addedson - The not-null ITreeNode to be addedpublic final void removeSon(ITreeNode son)
son - A not-null ITreeNode son of the curren instancepublic final java.util.List<ITreeNode> getSons(java.lang.String name)
public final ITreeNode getSon(java.lang.String name,
int pos)
public final java.util.Collection<java.lang.String> getSonNames()
public final java.util.List<ITreeNode> getSiblings()
public final int getPosition()
public final java.util.Iterator<ITreeNode> sonIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||