Package org.opentcs.access
Class ModelTransitionEvent
java.lang.Object
org.opentcs.access.ModelTransitionEvent
- All Implemented Interfaces:
Serializable
Emitted when the kernel loads a model.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModelTransitionEvent(String oldModelName, String newModelName, boolean modelContentChanged, boolean transitionFinished) Creates a new TCSModelTransitionEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the model for which this event was generated.Returns the model name the kernel is leaving.booleanReturnstrueif, and only if, the content of the model actually changed with the transition.booleanReturnstrueif, and only if, the transition to the new kernel state is finished.toString()
-
Constructor Details
-
ModelTransitionEvent
public ModelTransitionEvent(String oldModelName, String newModelName, boolean modelContentChanged, boolean transitionFinished) Creates a new TCSModelTransitionEvent.- Parameters:
oldModelName- The name of the previously loaded model.newModelName- The name of the new model.modelContentChanged- Whether the content of the model actually changed with the transition.transitionFinished- Whether the transition to the new model is finished, yet.
-
-
Method Details
-
getOldModelName
Returns the model name the kernel is leaving.- Returns:
- The model the kernel is leaving.
-
getNewModelName
Returns the model for which this event was generated.- Returns:
- The model for which this event was generated.
-
hasModelContentChanged
public boolean hasModelContentChanged()Returnstrueif, and only if, the content of the model actually changed with the transition.- Returns:
trueif, and only if, the content of the model actually changed with the transition.
-
isTransitionFinished
public boolean isTransitionFinished()Returnstrueif, and only if, the transition to the new kernel state is finished.- Returns:
trueif, and only if, the transition to the new kernel state is finished.
-
toString
-