|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.sched.ScheduleElement
ptolemy.actor.sched.Firing
public class Firing
This class is a schedule element that contains a reference to an actor and an iteration count. This class is used together with the Schedule class to construct a static schedule. This class is used to represent a single actor repeated some number of times, whereas Schedule is used for multi-actor schedules. The setActor() method is used to create the reference to an actor, and the setIterationCount() method to set the iteration count. The getActor() method will return a reference to this actor, and getIterationCount() will return the iteration count.
It is more efficient to use this class than to simply maintain a list of actors since actors will often fire multiple times consecutively. Using this class (and the Schedule data structure in general) greatly reduces the memory requirements of most large schedules.
Schedule
,
ScheduleElement
Yellow (chf) |
Green (vogel) |
Nested Class Summary | |
---|---|
private class |
Firing.ActorIterator
An adapter class for iterating over the elements of this schedule. |
Field Summary | |
---|---|
private Actor |
_actor
|
private java.util.List |
_firing
|
Fields inherited from class ptolemy.actor.sched.ScheduleElement |
---|
_parent |
Constructor Summary | |
---|---|
Firing()
Construct a firing with a default iteration count equal to one and with no parent schedule. |
|
Firing(Actor actor)
Construct a firing with a actor, an iteration count equal to one and no parent schedule. |
Method Summary | |
---|---|
java.util.Iterator |
actorIterator()
Return the actor invocation sequence of the schedule in the form of a sequence of actors. |
java.util.Iterator |
firingIterator()
Return the actor invocation sequence in the form of a sequence of firings. |
Actor |
getActor()
Get the actor associated with this Firing. |
void |
setActor(Actor actor)
Set the actor associated with this firing. |
java.lang.String |
toString()
Output a string representation of this Firing. |
Methods inherited from class ptolemy.actor.sched.ScheduleElement |
---|
_getVersion, _incrementVersion, getIterationCount, setIterationCount, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Actor _actor
private java.util.List _firing
Constructor Detail |
---|
public Firing()
public Firing(Actor actor)
actor
- The actor in the firing.Method Detail |
---|
public java.util.Iterator actorIterator()
A runtime exception is thrown if the underlying schedule structure is modified while the iterator is active.
actorIterator
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 Actor getActor()
setActor(Actor)
public void setActor(Actor actor)
actor
- The actor to associate with this firing.getActor()
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 |