TimeInstancepublic class TimeInstance extends Object Base class for representing time instances in a
TimedElementSupport 's begin and end instance times lists. |
Fields Summary |
---|
TimedElementSupport | timedElementThe associated TimeElement | boolean | clearOnResetIf true, this TimeInstance should be cleared from
the TimedElementSupport intance list on reset. | Time | timeThis instance's time. | boolean | isBeginTrue if this instance is in the begin instance list.
Fals if it is part of an end instance list. |
Constructors Summary |
---|
public TimeInstance(TimedElementSupport timedElement, Time time, boolean clearOnReset, boolean isBegin)Builds an instance time for the input TimedElementSupport
and time. The constructor will insert the Instance
automatically into the TimedElementSupport corresponding
instance list.
if (timedElement == null || time == null) {
throw new NullPointerException();
}
this.timedElement = timedElement;
this.time = time;
this.clearOnReset = clearOnReset;
this.isBegin = isBegin;
timedElement.addTimeInstance(this);
|
Methods Summary |
---|
void | setTime(Time newTime)Updates this instance time. This notifies the associated
TimedElementSupport through its instanceUpdate
method.
if (newTime == null) {
throw new NullPointerException();
}
time = newTime;
timedElement.onTimeInstanceUpdate(this);
|
|