|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.graph.sched.ScheduleElement
ptolemy.graph.sched.Firing
public class Firing
This class is a ScheduleElement that contains a reference to a firing element. The firingElement could be any Object. This class is used together with the Schedule class to construct a Schedule. The setFiringElement() method is used to create the reference to a firing element. The getFiringElement() method will return a reference to this firing element.
It is more efficient to use this class than to simply maintain a list of firing elements since firing elements will often firing multiple times consecutively. Using this class (and the Schedule data structure in general) greatly reduces the memory requirements of most large schedules.
Firing
,
Schedule
,
ScheduleElement
red (ssb) |
red (shahrooz) |
Nested Class Summary | |
---|---|
private class |
Firing.FiringElementIterator
An adapter class for iterating over the elements of this schedule. |
Field Summary | |
---|---|
private java.util.List |
_firing
|
private java.lang.Object |
_firingElement
|
Fields inherited from class ptolemy.graph.sched.ScheduleElement |
---|
_parent |
Constructor Summary | |
---|---|
Firing()
Construct a firing with a default iteration count equal to one and with no parent schedule. |
|
Firing(java.lang.Class firingElementClass)
Construct a firing with a given firing element type, an iteration count equal to one and no parent schedule. |
|
Firing(java.lang.Object firingElement)
Construct a firing with a firingElement, an iteration count equal to one and no parent schedule. |
Method Summary | |
---|---|
java.util.Iterator |
firingElementIterator()
Return the firing element invocation sequence of the schedule in the form of a sequence of firing elements. |
java.util.Iterator |
firingIterator()
Return the firing element invocation sequence in the form of a sequence of firings. |
java.lang.Object |
getFiringElement()
Get the firing element associated with this Firing. |
void |
setFiringElement(java.lang.Object firingElement)
Set the firing element associated with this firing. |
java.lang.String |
toParenthesisString(java.util.Map nameMap,
java.lang.String delimiter)
Print the firing in a parenthesis style. |
java.lang.String |
toString()
Return a string representation of this Firing. |
Methods inherited from class ptolemy.graph.sched.ScheduleElement |
---|
_getVersion, _incrementVersion, firingElementClass, getIterationCount, getParent, setIterationCount, setParent, toParenthesisString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.Object _firingElement
private java.util.List _firing
Constructor Detail |
---|
public Firing()
public Firing(java.lang.Object firingElement)
firingElement
- The firing element in the firing.public Firing(java.lang.Class firingElementClass)
firingElementClass
- The class of the firing element in the firing.Method Detail |
---|
public java.util.Iterator firingElementIterator()
A runtime exception is thrown if the underlying schedule structure is modified while the iterator is active.
firingElementIterator
in class ScheduleElement
java.util.ConcurrentModificationException
- If the
underlying schedule structure is modified while the iterator
is active.public java.util.Iterator firingIterator()
A runtime exception is thrown if the underlying schedule structure is modified while the iterator is active.
firingIterator
in class ScheduleElement
java.util.ConcurrentModificationException
- If the
underlying schedule structure is modified while the iterator
is active.public java.lang.Object getFiringElement()
setFiringElement(Object)
public void setFiringElement(java.lang.Object firingElement)
firingElement
- The firing element to associate with this firing.getFiringElement()
public java.lang.String toParenthesisString(java.util.Map nameMap, java.lang.String delimiter)
toParenthesisString
in class ScheduleElement
nameMap
- A mapping from firing element to its short name.delimiter
- The delimiter between iteration count and iterand.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |