Package dev.prozilla.pine.core.state
Interface StateMachineProvider<Context,S extends State<Context>>
- All Superinterfaces:
MutableStateProvider<Context,,S> StateProvider<Context,S>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface StateMachineProvider<Context,S extends State<Context>>
extends MutableStateProvider<Context,S>
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidchangeState(S newState) Exits the current state and enters a new state, unless both are equal.default SgetState()Methods inherited from interface dev.prozilla.pine.core.state.MutableStateProvider
changeState, toggleStateMethods inherited from interface dev.prozilla.pine.core.state.StateProvider
isAnyState, isState
-
Method Details
-
getStateMachine
StateMachine<Context,S> getStateMachine() -
getState
-
changeState
Description copied from interface:MutableStateProviderExits the current state and enters a new state, unless both are equal.- Specified by:
changeStatein interfaceMutableStateProvider<Context,S extends State<Context>> - Parameters:
newState- The new state to enter
-