mapss.dif.csdf.sdf.sched
Class ScheduleTreeNode

java.lang.Object
  extended by mapss.dif.csdf.sdf.sched.ScheduleTreeNode

public class ScheduleTreeNode
extends java.lang.Object

The class for schedule tree node.

Version:
$Id: ScheduleTreeNode.java 406 2007-05-10 14:27:07Z plishker $
Author:
Mingyung Ko

Field Summary
 int duration
           
 mocgraph.Node graphNode
           
 int loopCount
           
 ScheduleTreeNode parent
           
 mocgraph.sched.ScheduleElement scheduleElement
           
 int start
           
 int stop
           
 
Constructor Summary
ScheduleTreeNode(ScheduleTreeNode parent)
          Constructor for given parent.
 
Method Summary
 boolean isLeaf()
          Check whether it's a leaf node.
 ScheduleTreeNode leftChild()
          Return left child.
 java.util.List parents()
          Return all parents including immediate and grand parents.
 ScheduleTreeNode rightChild()
          Return right child.
 void setChildren(ScheduleTreeNode left, ScheduleTreeNode right)
          Set both children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

public ScheduleTreeNode parent

graphNode

public mocgraph.Node graphNode

loopCount

public int loopCount

start

public int start

stop

public int stop

duration

public int duration

scheduleElement

public mocgraph.sched.ScheduleElement scheduleElement
Constructor Detail

ScheduleTreeNode

public ScheduleTreeNode(ScheduleTreeNode parent)
Constructor for given parent.

Parameters:
parent - The parent node.
Method Detail

isLeaf

public boolean isLeaf()
Check whether it's a leaf node.

Returns:
True if leaf; false otherwise.

leftChild

public ScheduleTreeNode leftChild()
Return left child.

Returns:
Left child.

parents

public java.util.List parents()
Return all parents including immediate and grand parents. Parents are returned in order from the closest to the grandest.

Returns:
A list of parents from the closest to the grandest.

rightChild

public ScheduleTreeNode rightChild()
Return right child.

Returns:
Right child.

setChildren

public void setChildren(ScheduleTreeNode left,
                        ScheduleTreeNode right)
Set both children.

Parameters:
left - Left child.
right - Right child.