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
-
Method Details
-
state
S state()Returns the current state.- Returns:
- the current state.
-
isState
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.
-