www.sdmetrics.com

sdmetrics.app
Class TreeViewCycles.Node

java.lang.Object
  |
  +--sdmetrics.app.TreeViewCycles.Node
Enclosing class:
TreeViewCycles

public class TreeViewCycles.Node
extends java.lang.Object

Class to represent a node in a "cycle" tree.


Constructor Summary
TreeViewCycles.Node(java.lang.String s)
           
 
Method Summary
 void add(java.lang.Object o)
          Add a child node to the node.
 java.lang.Object getChildAt(int index)
          Get a child node of this node.
 int getChildCount()
          Get the number of children of the node.
 int getIndexOfChild(java.lang.Object o)
          Get the index for a child node of this node.
 boolean hasCycle()
          Test if this node is part of a cycle.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeViewCycles.Node

public TreeViewCycles.Node(java.lang.String s)
Parameters:
s - String label for the node (the model element name).
Method Detail

hasCycle

public boolean hasCycle()
Test if this node is part of a cycle.

Returns:
true if the node is part of a cycle, else false.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

add

public void add(java.lang.Object o)
Add a child node to the node.

Parameters:
o - Child not to add.

getChildCount

public int getChildCount()
Get the number of children of the node.

Returns:
The number N of children. The can be addressed via an index that runs from 0 to N-1.

getChildAt

public java.lang.Object getChildAt(int index)
Get a child node of this node.

Parameters:
index - Index of the child node.
Returns:
The object representing the specified child node.

getIndexOfChild

public int getIndexOfChild(java.lang.Object o)
Get the index for a child node of this node.

Parameters:
o - The object representing the requested child node.
Returns:
Index of the child node with that object, or -1 if no such object exists.

www.sdmetrics.com