Package org.opentcs.access

# Class ModelTransitionEvent

java.lang.Object
org.opentcs.access.ModelTransitionEvent

All Implemented Interfaces:
  `java.io.Serializable`

    public class ModelTransitionEvent
    extends java.lang.Object
    implements java.io.Serializable

Emitted when the kernel loads a model.

See Also:
  Serialized Form

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ModelTransitionEvent​(java.lang.String oldModelName, java.lang.String newModelName, boolean modelContentChanged, boolean transitionFinished)` | Creates a new TCSModelTransitionEvent.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.String` | `getNewModelName()` | Returns the model for which this event was generated.
  `java.lang.String` | `getOldModelName()` | Returns the model name the kernel is leaving.
  `boolean` | `hasModelContentChanged()` | Returns `true` if, and only if, the content of the model actually changed with the transition.
  `boolean` | `isTransitionFinished()` | Returns `true` if, and only if, the transition to the new kernel state is finished.
  `java.lang.String` | `toString()` |

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ModelTransitionEvent

    public ModelTransitionEvent​(java.lang.String oldModelName, java.lang.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

    public java.lang.String getOldModelName()
    Returns the model name the kernel is leaving.
    Returns:
      The model the kernel is leaving.

  - ### getNewModelName

    public java.lang.String getNewModelName()
    Returns the model for which this event was generated.
    Returns:
      The model for which this event was generated.

  - ### hasModelContentChanged

    public boolean hasModelContentChanged()
    Returns `true` if, and only if, the content of the model actually changed with the transition.
    Returns:
      `true` if, and only if, the content of the model actually changed with the transition.

  - ### isTransitionFinished

    public boolean isTransitionFinished()
    Returns `true` if, and only if, the transition to the new kernel state is finished.
    Returns:
      `true` if, and only if, the transition to the new kernel state is finished.

  - ### toString

    public java.lang.String toString()
    Overrides:
      `toString` in class `java.lang.Object`