Interface Stateful<S extends Enum>

All Known Implementing Classes:
AbstractStateMachine, DcpChannel

public interface Stateful<S extends Enum>
A stateful component that changes its state and notifies subscribed parties.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isState(S state)
    Check if the given state is the same as the current one.
    Returns the current state.
  • Method Details

    • state

      S state()
      Returns the current state.
      Returns:
      the current state.
    • isState

      boolean isState(S state)
      Check if the given state is the same as the current one.
      Parameters:
      state - the stats to check against.
      Returns:
      true if it is the same, false otherwise.