Releases: open-jumpco/kfsm
Added typed parameters and return types for events/actions
This release adds support for typed parameters and return-types.
All events will only receive one optional parameter of the same type and an optional return value all the same type.
Rename DSL functions
This build renames a few DSL functions and will break existing code.
state
-> whenState
transition
-> onEvent
entry
-> onEntry
exit
-> onExit
pushTransition
-> onEventPush
popTransition
-> onEventPop
initial
-> initialState
initialMap
-> initialStates
Remove restriction from event types.
Previously state machine events had to be an enum class.
This restriction has now been removed.
The constructor of the builder does not require a set of valid events of the specific type.
The events will be stored in sets or be used as keys in maps, they require correct implementations of equals and hashCode. Enums, primitive types and data classes are all good candidates.
The documentation has been updated with a packet reader example.
Refactored to support Kotlin style guide
Files moved and companion objects moved.
File renamed.
Externalizing state
This release includes the following:
- Externalizing state
- Documentation improvement
- Refactoring of instance creation
Named state maps, push / pop and automatic transitions
The following features have been added:
- Named state maps
- Push / pop transitions
- Automatic transitions
Rename on to transition
Improve the DSL by rename on
to transition