| java.lang.Object com.sun.perseus.model.TimeInterval
TimeInterval | final public class TimeInterval (Code) | | A TimeInterval models a specific 'run' of a
TimedElement . It has a begin and end time and
a list of IntervalTimeInstance s depending on its begin
or end time.
version: $Id: TimeInterval.java,v 1.3 2006/04/21 06:39:30 st125089 Exp $ |
Constructor Summary | |
| TimeInterval(Time begin, Time end) Creates a new interval with a specific begin and end times.
Parameters: begin - the initial begin time. |
Method Summary | |
void | addDependent(IntervalTimeInstance timeInstance) Adds a new IntervalTimeInstance dependent.
If timeInstance synchronizes on begin, it is
added to the beginDependent list. | void | prune() Called when the interval is pruned from a timed element. | void | removeDependent(IntervalTimeInstance timeInstance) Removes the input IntervalTimeInstance dependent.
Parameters: timeInstance - the IntervalTimeInstance to remove from this interval. | void | setBegin(Time newBegin) Updates the begin time. | void | setEnd(Time newEnd) Updates the end time. |
beginDependents | Vector beginDependents(Code) | | The list of dependent begin time instances.
Contains IntervalTimeInstance objects.
|
endDependents | Vector endDependents(Code) | | The list of end dependents. Contains
IntervalTimeInstance objects.
|
lastDur | Time lastDur(Code) | | The end of the last simple duration
|
TimeInterval | TimeInterval(Time begin, Time end)(Code) | | Creates a new interval with a specific begin and end times.
Parameters: begin - the initial begin time. This time should be resolved.Otherwise, an IllegalStateException is thrown.Should not be null. Parameters: end - the initial end time. Should not be null. |
addDependent | void addDependent(IntervalTimeInstance timeInstance)(Code) | | Adds a new IntervalTimeInstance dependent.
If timeInstance synchronizes on begin, it is
added to the beginDependent list. Otherwise,
it is added to the endDependent list.
Parameters: timeInstance - the new IntervalTimeInstance .If null, throws a NullPointerException . |
prune | void prune()(Code) | | Called when the interval is pruned from a timed element. The result is
that all dependent time instances should be removed from their respective
instance lists.
|
removeDependent | void removeDependent(IntervalTimeInstance timeInstance)(Code) | | Removes the input IntervalTimeInstance dependent.
Parameters: timeInstance - the IntervalTimeInstance to remove from this interval. Throws a NullPointerException if null. |
setBegin | void setBegin(Time newBegin)(Code) | | Updates the begin time. Note that an unresolved begin time is
illegal. Trying to set one will cause an exception to be thrown
(an IllegalArgumentException).
Dependent end conditions are notified of begin time change.
Parameters: newBegin - the new begin time. |
setEnd | void setEnd(Time newEnd)(Code) | | Updates the end time. Dependent end conditions are notified
of the end time change. A
Parameters: newEnd - the new end time. |
|
|