XMT-O Reference Software

xmto2xmta.timegraph
Class Container

java.lang.Object
  |
  +--xmto2xmta.timegraph.Container
Direct Known Subclasses:
SimpleContainer, TimeContainer

public class Container
extends java.lang.Object

Generic container class (a node) in timing graph.

History:


Field Summary
private  java.util.Vector children
           
protected  java.io.PrintWriter errWriter
           
private  java.lang.Integer id
           
private  Container parent
           
private  TimeGraph timeGraph
           
protected  java.io.PrintWriter writer
           
 
Constructor Summary
Container()
           
Container(TimeGraph timeGraph, java.lang.Integer id, Container parent)
           
 
Method Summary
 void addChild(Container child)
           
 java.util.Enumeration children()
           
 java.util.Vector getChildren()
           
 Container getCommonAscendant(Container otherContainer)
          Find the nearest common ascendant of this container and another container in the time graph.
 java.lang.Integer getID()
           
 Container getNextChild(Container child)
          Return the next sibling of the given child.
 Container getParent()
           
 Container getPrevChild(Container child)
          Return the previous sibling of the given child.
 Container getRoot()
           
 TimeGraph getTimeGraph()
           
 void hasEvent()
           
 boolean isAscendantOf(Container otherContainer)
           
 boolean isCommonAscendantOf(Container container1, Container container2)
           
 void setID(java.lang.Integer id)
           
 void setParent(Container parent)
           
 void setTimeGraph(TimeGraph timeGraph)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

parent

private Container parent

children

private java.util.Vector children

id

private java.lang.Integer id

timeGraph

private TimeGraph timeGraph

writer

protected java.io.PrintWriter writer

errWriter

protected java.io.PrintWriter errWriter
Constructor Detail

Container

public Container()

Container

public Container(TimeGraph timeGraph,
                 java.lang.Integer id,
                 Container parent)
Method Detail

setTimeGraph

public void setTimeGraph(TimeGraph timeGraph)

getTimeGraph

public TimeGraph getTimeGraph()

setParent

public void setParent(Container parent)

getParent

public Container getParent()

setID

public void setID(java.lang.Integer id)

getID

public java.lang.Integer getID()

getRoot

public Container getRoot()

addChild

public void addChild(Container child)

getChildren

public java.util.Vector getChildren()

children

public java.util.Enumeration children()

getPrevChild

public Container getPrevChild(Container child)
Return the previous sibling of the given child. If the given child is not found, or it's the first child, return null.

getNextChild

public Container getNextChild(Container child)
Return the next sibling of the given child. If the given child is not found, or it's the last child, return null.

isCommonAscendantOf

public boolean isCommonAscendantOf(Container container1,
                                   Container container2)

isAscendantOf

public boolean isAscendantOf(Container otherContainer)

getCommonAscendant

public Container getCommonAscendant(Container otherContainer)
Find the nearest common ascendant of this container and another container in the time graph. Note that if one of the two containers is a parent or an ascendant of the other, it is considered a common ascendant.

hasEvent

public void hasEvent()

XMT-O Reference Software