Package-level declarations

Types

Link copied to clipboard
interface DataEvent<out D : Any> : Event

Event holding some data

Link copied to clipboard
interface DataExtractor<D : Any>

Allows to extract data for DataState from any Event

Link copied to clipboard
interface Event

Base interface for events which may trigger transitions of StateMachine Events are expected to be immutable subjects by design.

Link copied to clipboard
interface EventMatcher<E : Event>

Adds an ability to select who Transition matches Event subclass

Link copied to clipboard

Special event generated by the library when a state is finished. Transitions use special event matcher by default to match only related events. If FinishedEvent is generated by FinalDataState entry, data field of event will receive data from this state using DataExtractor

Link copied to clipboard
sealed interface GeneratedEvent : Event

Marker interface for all events that are generated by the library itself

Link copied to clipboard

Special kind of event, which is not processed by a stateMachine itself but used to represent different kinds of GeneratedEvent in serialized form for event recording feature.

Link copied to clipboard
sealed interface StartEvent : GeneratedEvent

Initial event which is processed on state machine start

Link copied to clipboard
object UndoEvent : Event

User may call StateMachine.processEvent with UndoEvent as alternative to calling StateMachine.undo

Link copied to clipboard
class WrappedEvent(val event: Event, val argument: Any?) : GeneratedEvent

System event which is used by the library to wrap original event and argument, so user may access them, when this event is processed. Currently only UndoEvent is transformed to this event.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard