TransitionEventpublic class TransitionEvent extends ControllerEvent TransitionEvent is a ControllerEvent that indicates
that a Controller has changed state. |
Fields Summary |
---|
int | previousState | int | currentState | int | targetState |
Constructors Summary |
---|
public TransitionEvent(Controller from, int previous, int current, int target)Construct a new TransitionEvent .
super(from);
previousState = previous;
currentState = current;
targetState = target;
|
Methods Summary |
---|
public int | getCurrentState()Get the Controller's state at the time this event was
generated
return currentState;
| public int | getPreviousState()Get the state that the Controller was in before this event occurred.
return previousState;
| public int | getTargetState()Get the Controller's target state at the time this event
was generated.
return targetState;
| static java.lang.String | stateName(int state)
switch (state) {
case Controller.Unrealized: return "Unrealized";
case Controller.Realizing: return "Realizing";
case Controller.Realized: return "Realized";
case Controller.Prefetching: return "Prefetching";
case Controller.Prefetched: return "Prefetched";
case Controller.Started: return "Started";
case Processor.Configuring: return "Configuring";
case Processor.Configured: return "Configured";
default: return "<Unknown>";
}
| public java.lang.String | toString()Returns the String representation of this event's values.
return getClass().getName() + "[source=" + eventSrc +
",previous=" + stateName(previousState) +
",current=" + stateName(currentState) +
",target=" + stateName(targetState) + "]";
|
|