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:
- 15 Mar 2001 - Created file.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
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
Container
public Container()
Container
public Container(TimeGraph timeGraph,
java.lang.Integer id,
Container parent)
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()