|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.graph.sched.ScheduleElement
public abstract class ScheduleElement
This is an abstract base class for a schedule element. Instances of the Schedule and Firing subclasses are used to construct a schedule(static or dynamic). A Schedule can be thought of as a structure that consists of an iteration count and a list of ScheduleElements. A ScheduleElement can be a Firing, or another Schedule. It is usually required that, all of the lowest-level ScheduleElements are Firings. It is up to the scheduler to enforce this, however. The Schedule class is a ScheduleElement that is a schedule. Schedules are created by schedule analyses. The Firing class is a ScheduleElement that contains a Firing element. Therefore, the top-level ScheduleElement must be an instance of Schedule, and all of the lowest-level elements must each be instances of Firing.
This base class implements the getIterationCount() and setIterationCount() methods, which return and set the iteration count for this schedule element. A default value of 1 is used for the iteration count.
Firing
,
Schedule
,
ScheduleElement
,
ScheduleAnalysis
red (ssb) |
red (shahrooz) |
Field Summary | |
---|---|
private java.lang.Class |
_firingElementClass
|
private int |
_iterationCount
|
protected ScheduleElement |
_parent
The parent schedule of this schedule. |
private long |
_scheduleVersion
|
Constructor Summary | |
---|---|
ScheduleElement()
Construct a schedule element with an iteration count of 1 and with no parent schedule element. |
|
ScheduleElement(java.lang.Class firingElementClass)
Construct a schedule element with an iteration count of 1 and with no parent schedule element. |
Method Summary | |
---|---|
protected long |
_getVersion()
Return the current version of this schedule element. |
protected void |
_incrementVersion()
Increment the version of this schedule element and if this schedule element has a parent schedule, increment the version of the parent schedule as well. |
java.lang.Class |
firingElementClass()
Return the class type of the firing element in this class. |
abstract java.util.Iterator |
firingElementIterator()
Return the firing element invocation sequence of the schedule in the form of a sequence of firing elements. |
abstract java.util.Iterator |
firingIterator()
Return the firing invocation sequence in the form of a sequence of firings. |
int |
getIterationCount()
Return the iteration count for this schedule. |
ScheduleElement |
getParent()
Return the parent schedule element of this schedule element. |
void |
setIterationCount(int count)
Set the iteration count for this schedule. |
void |
setParent(ScheduleElement parent)
Set the parent schedule element of this schedule element to the specified schedule element. |
java.lang.String |
toParenthesisString(java.util.Map nameMap)
Print the schedule in a nested parenthesis style and set character 'space' as the delimiter. |
abstract java.lang.String |
toParenthesisString(java.util.Map nameMap,
java.lang.String delimiter)
Print the schedule in a nested parenthesis style. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ScheduleElement _parent
private int _iterationCount
private long _scheduleVersion
private java.lang.Class _firingElementClass
Constructor Detail |
---|
public ScheduleElement()
public ScheduleElement(java.lang.Class firingElementClass)
firingElementClass
- The class of the firing elements that will be
added to this schedule.Method Detail |
---|
public java.lang.Class firingElementClass()
public abstract java.util.Iterator firingElementIterator()
It must be implemented by the derived classes to provide the proper functionality.
java.util.ConcurrentModificationException
- If the
underlying schedule structure is modified while the iterator
is active.public abstract java.util.Iterator firingIterator()
public int getIterationCount()
setIterationCount(int)
public ScheduleElement getParent()
setParent(ScheduleElement)
public void setIterationCount(int count)
count
- The iteration count for this schedule.getIterationCount()
public void setParent(ScheduleElement parent)
parent
- The parent schedule element of this schedule
element.getParent()
public java.lang.String toParenthesisString(java.util.Map nameMap)
toParenthesisString(Map, String)
.
nameMap
- The map from firing elements to their short names.
public abstract java.lang.String toParenthesisString(java.util.Map nameMap, java.lang.String delimiter)
nameMap
.
nameMap
- The map from firing elements to their short names.delimiter
- The delimiter between iterands.
protected long _getVersion()
protected void _incrementVersion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |