java.lang.Object
io.github.astrapi69.design.pattern.state.component.ComponentStateMachine<C,S>
Type Parameters:
C - the generic type of the component
S - the generic type of the current state
Direct Known Subclasses:
AbstractJComponentStateMachine

public abstract class ComponentStateMachine<C,S> extends Object
The abstract class ComponentStateMachine can provide states on components. It manages the current state of a component and defines abstract methods for updating the component state and enabling/disabling the component. For an example, see the unit tests.
  • Constructor Details

    • ComponentStateMachine

      public ComponentStateMachine()
  • Method Details

    • updateComponentState

      protected abstract void updateComponentState()
      Updates the state of the component.
    • setEnabled

      protected abstract void setEnabled(boolean enabled)
      Sets the enabled flag for the component.
      Parameters:
      enabled - the enabled flag for the component