public class Firing extends ScheduleElement
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) |
_parent
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
_getVersion, _incrementVersion, firingElementClass, getIterationCount, getParent, setIterationCount, setParent, toParenthesisString
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.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