diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/-either-serializer.html similarity index 69% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-chain-state-updated.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/-either-serializer.html index 02656e4e0f0..e3cf3f1abb5 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/-either-serializer.html @@ -1,7 +1,7 @@ - onChainStateUpdated + EitherSerializer
@@ -13,21 +13,21 @@
-
+
-

onChainStateUpdated

+

EitherSerializer

-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
fun <T1, T2> EitherSerializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>)
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/descriptor.html similarity index 81% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-start-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/descriptor.html index b30594366ea..e75294e963d 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/descriptor.html @@ -1,7 +1,7 @@ - onStartChain + descriptor
@@ -13,21 +13,21 @@
-
+
-

onStartChain

+

descriptor

-
open override val onStartChain: Flow<State>
+
open override val descriptor: SerialDescriptor
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/get-active-states.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/deserialize.html similarity index 73% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/get-active-states.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/deserialize.html index 82e647851d6..983d92782db 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/get-active-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/deserialize.html @@ -1,7 +1,7 @@ - getActiveStates + deserialize
@@ -13,21 +13,21 @@
-
+
-

getActiveStates

+

deserialize

-
open suspend override fun getActiveStates(): List<State>
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/index.html new file mode 100644 index 00000000000..45608e0fbc1 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/index.html @@ -0,0 +1,99 @@ + + + + [android]EitherSerializer + + +
+
+ + +
+
+
+
+
+
+ +
+

EitherSerializer

+
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
+
+
+
+
+

Functions

+
+
+
+
deserialize +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
+
+
+
+
+
+
+ +
+
+
serialize +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
+
+
+
+
+
+
+
+

Properties

+
+
+
+
descriptor +
Link copied to clipboard
+
+
+
+ +
+
+
open override val descriptor: SerialDescriptor
+
+
+
+
+
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/update.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/serialize.html similarity index 71% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/update.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/serialize.html index f6abdeb21c6..af318b6cf4f 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/update.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either-serializer/serialize.html @@ -1,7 +1,7 @@ - update + serialize
@@ -13,23 +13,23 @@
-
+
-

update

+

serialize

-
open suspend override fun update(old: State, new: State)
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
-

Must set current set using State.context

+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/index.html index 0d3de04f7ea..cf3f444a1e8 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/index.html @@ -26,8 +26,30 @@
object Companion
-
+
+

Functions

+
+
+
+
serializer +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+
+
+
+

Extensions

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/serializer.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/serializer.html new file mode 100644 index 00000000000..f9749eed5c6 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[android]-either/-companion/serializer.html @@ -0,0 +1,39 @@ + + + + serializer + + +
+
+ + +
+
+
+
+
+
+ +
+

serializer

+
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/-either-serializer.html similarity index 69% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-chain-state-updated.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/-either-serializer.html index 8fbbdbf9a2d..fd7c5740c2b 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/-either-serializer.html @@ -1,7 +1,7 @@ - onChainStateUpdated + EitherSerializer
@@ -13,21 +13,21 @@
-
+
-

onChainStateUpdated

+

EitherSerializer

-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
fun <T1, T2> EitherSerializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>)
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/descriptor.html similarity index 74% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-end-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/descriptor.html index 2100747698c..8d3f4edeb64 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/descriptor.html @@ -1,7 +1,7 @@ - onEndChain + descriptor
@@ -13,21 +13,21 @@
-
+
-

onEndChain

+

descriptor

-
open override val onEndChain: Flow<State>
+
open override val descriptor: SerialDescriptor
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/deserialize.html similarity index 74% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-start-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/deserialize.html index 3e931c263cb..87506d85b20 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/deserialize.html @@ -1,7 +1,7 @@ - onStartChain + deserialize
@@ -13,21 +13,21 @@
-
+
-

onStartChain

+

deserialize

-
open override val onStartChain: Flow<State>
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/index.html new file mode 100644 index 00000000000..0219847b2e3 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/index.html @@ -0,0 +1,99 @@ + + + + [common]EitherSerializer + + +
+
+ + +
+
+
+
+
+
+ +
+

EitherSerializer

+
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
+
+
+
+
+

Functions

+
+
+
+
deserialize +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
+
+
+
+
+
+
+ +
+
+
serialize +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
+
+
+
+
+
+
+
+

Properties

+
+
+
+
descriptor +
Link copied to clipboard
+
+
+
+
common
+
+
+
open override val descriptor: SerialDescriptor
+
+
+
+
+
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/update.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/serialize.html similarity index 72% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/update.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/serialize.html index 042100ab1fa..abacb538b74 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/update.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either-serializer/serialize.html @@ -1,7 +1,7 @@ - update + serialize
@@ -13,23 +13,23 @@
-
+
-

update

+

serialize

-
open suspend override fun update(old: State, new: State)
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
-

Must set current set using State.context

+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/index.html index f994d66602a..a88c0ace6ae 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/index.html @@ -26,8 +26,30 @@
object Companion
-
+
+

Functions

+
+
+
+
serializer +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+
+
+
+

Extensions

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/serializer.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/serializer.html new file mode 100644 index 00000000000..2560da15b14 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[common]-either/-companion/serializer.html @@ -0,0 +1,39 @@ + + + + serializer + + +
+
+ + +
+
+
+
+
+
+ +
+

serializer

+
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/-either-serializer.html similarity index 69% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-chain-state-updated.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/-either-serializer.html index 1920cd56043..4c6193b993d 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/-either-serializer.html @@ -1,7 +1,7 @@ - onChainStateUpdated + EitherSerializer
@@ -13,21 +13,21 @@
-
+
-

onChainStateUpdated

+

EitherSerializer

-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
fun <T1, T2> EitherSerializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>)
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/descriptor.html similarity index 75% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-end-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/descriptor.html index 0a0646be14a..af9402217ad 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/descriptor.html @@ -1,7 +1,7 @@ - onEndChain + descriptor
@@ -13,21 +13,21 @@
-
+
-

onEndChain

+

descriptor

-
open override val onEndChain: Flow<State>
+
open override val descriptor: SerialDescriptor
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/deserialize.html similarity index 74% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-start-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/deserialize.html index c90486ffd2c..3b5b77e0917 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/deserialize.html @@ -1,7 +1,7 @@ - onStartChain + deserialize
@@ -13,21 +13,21 @@
-
+
-

onStartChain

+

deserialize

-
open override val onStartChain: Flow<State>
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/index.html new file mode 100644 index 00000000000..fab4f774ab1 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/index.html @@ -0,0 +1,99 @@ + + + + [jvm]EitherSerializer + + +
+
+ + +
+
+
+
+
+
+ +
+

EitherSerializer

+
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
+
+
+
+
+

Functions

+
+
+
+
deserialize +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open override fun deserialize(decoder: Decoder): Either<T1, T2>
+
+
+
+
+
+
+ +
+
+
serialize +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
+
+
+
+
+
+
+
+

Properties

+
+
+
+
descriptor +
Link copied to clipboard
+
+
+
+ +
+
+
open override val descriptor: SerialDescriptor
+
+
+
+
+
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/update.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/serialize.html similarity index 72% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/update.html rename to micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/serialize.html index 64d432df307..45d70b8252b 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/update.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either-serializer/serialize.html @@ -1,7 +1,7 @@ - update + serialize
@@ -13,23 +13,23 @@
-
+
-

update

+

serialize

-
open suspend override fun update(old: State, new: State)
+
open override fun serialize(encoder: Encoder, value: Either<T1, T2>)
-

Must set current set using State.context

+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/index.html index fb49e300a0d..81a2e53b8c2 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/index.html @@ -26,8 +26,30 @@
object Companion
-
+
+

Functions

+
+
+
+
serializer +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+
+
+
+

Extensions

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/serializer.html b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/serializer.html new file mode 100644 index 00000000000..71b83d36739 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/[jvm]-either/-companion/serializer.html @@ -0,0 +1,39 @@ + + + + serializer + + +
+
+ + +
+
+
+
+
+
+ +
+

serializer

+
+
+ +
+
fun <T1, T2> serializer(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>): KSerializer<Either<T1, T2>>
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.common/index.html b/micro_utils.dokka/dev.inmo.micro_utils.common/index.html index 4b29e4b6eda..35af7c75b39 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.common/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.common/index.html @@ -206,6 +206,25 @@
data class EitherSecond<T1, T2>(t2: T2) : Either<T1, T2>

This type Either will always have not nullable t2

+
+
+
+
+ +
+
+
EitherSerializer +
Link copied to clipboard
+
+
+
+ +
+
+
+
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
+
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/-f-s-m-builder.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/-f-s-m-builder.html index 1ddaa3ab7c4..4dfc8441392 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/-f-s-m-builder.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/-f-s-m-builder.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/default-state-handler.html similarity index 74% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-end-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/default-state-handler.html index b345f5cde95..f930c830aed 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/default-state-handler.html @@ -1,7 +1,7 @@ - onEndChain + defaultStateHandler
@@ -13,21 +13,21 @@
-
+
-

onEndChain

+

defaultStateHandler

-
open override val onEndChain: Flow<State>
+
var defaultStateHandler: StatesHandler<T, T>?
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/do-when.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/do-when.html new file mode 100644 index 00000000000..27ec6895a73 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/do-when.html @@ -0,0 +1,39 @@ + + + + doWhen + + +
+
+ + +
+
+
+
+
+
+ +
+

doWhen

+
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/index.html index 8e0007a1fb1..5b38295a548 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/index.html @@ -17,22 +17,22 @@

FSMBuilder

-
class FSMBuilder(statesManager: StatesManager)
+
class FSMBuilder<T : State>(statesManager: StatesManager<T>, defaultStateHandler: StatesHandler<T, T>?)
-
+

Functions

-
+
-
add +
add
Link copied to clipboard
@@ -42,17 +42,17 @@
-
fun <I : State> add(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> add(filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
fun <I : T> add(kClass: KClass<I>, handler: StatesHandler<I, T>)
- +
-
addStrict +
addStrict
Link copied to clipboard
@@ -62,7 +62,7 @@
-
fun <I : State> addStrict(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> addStrict(kClass: KClass<I>, handler: StatesHandler<I, T>)
@@ -82,7 +82,67 @@
-
fun build(): DefaultStatesMachine
+
fun build(): DefaultStatesMachine<T>
+
+
+
+
+
+
+ +
+
+
doWhen +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
onStateOrSubstate +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
strictlyOn +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
@@ -91,7 +151,23 @@

Properties

-
+
+
+
+
defaultStateHandler +
Link copied to clipboard
+
+
+
+ +
+
+
var defaultStateHandler: StatesHandler<T, T>?
+
+
+
+
+
statesManager @@ -102,52 +178,12 @@
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
-

Extensions

-
-
-
-
onStateOrSubstate -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
-
-
-
-
-
-
- -
-
-
strictlyOn -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
-
-
-
-
-
-
-
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/on-state-or-substate.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/on-state-or-substate.html new file mode 100644 index 00000000000..56dc5d6ab92 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/on-state-or-substate.html @@ -0,0 +1,39 @@ + + + + onStateOrSubstate + + +
+
+ + +
+
+
+
+
+
+ +
+

onStateOrSubstate

+
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/states-manager.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/states-manager.html index 86a6ca3bf09..c36b894fab7 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/states-manager.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/states-manager.html @@ -27,7 +27,7 @@
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/strictly-on.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/strictly-on.html new file mode 100644 index 00000000000..f1bd47c8375 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]-f-s-m-builder/strictly-on.html @@ -0,0 +1,39 @@ + + + + strictlyOn + + +
+
+ + +
+
+
+
+
+
+ +
+

strictlyOn

+
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]build-f-s-m.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]build-f-s-m.html index 947acb287ff..4a110f8efa5 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]build-f-s-m.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[android]build-f-s-m.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/get-active-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/default-state-handler.html similarity index 73% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/get-active-states.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/default-state-handler.html index b5f3c133ff3..31e7e0ea1dc 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-states-manager/get-active-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/default-state-handler.html @@ -1,7 +1,7 @@ - getActiveStates + defaultStateHandler
@@ -13,21 +13,21 @@
-
+
-

getActiveStates

+

defaultStateHandler

-
open suspend override fun getActiveStates(): List<State>
+
var defaultStateHandler: StatesHandler<T, T>?
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/do-when.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/do-when.html new file mode 100644 index 00000000000..3b51db50923 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/do-when.html @@ -0,0 +1,39 @@ + + + + doWhen + + +
+
+ + +
+
+
+
+
+
+ +
+

doWhen

+
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/index.html index 8e0abd95d06..5e5da9ad839 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/index.html @@ -17,22 +17,22 @@

FSMBuilder

-
class FSMBuilder(statesManager: StatesManager)
+
class FSMBuilder<T : State>(statesManager: StatesManager<T>, defaultStateHandler: StatesHandler<T, T>?)
-
+

Functions

-
+
-
add +
add
Link copied to clipboard
@@ -42,17 +42,17 @@
-
fun <I : State> add(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> add(filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
fun <I : T> add(kClass: KClass<I>, handler: StatesHandler<I, T>)
- +
-
addStrict +
addStrict
Link copied to clipboard
@@ -62,7 +62,7 @@
-
fun <I : State> addStrict(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> addStrict(kClass: KClass<I>, handler: StatesHandler<I, T>)
@@ -82,7 +82,67 @@
-
fun build(): DefaultStatesMachine
+
fun build(): DefaultStatesMachine<T>
+
+
+
+
+
+
+ +
+
+
doWhen +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
onStateOrSubstate +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
strictlyOn +
Link copied to clipboard
+
+
+
+
common
+
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
@@ -91,7 +151,23 @@

Properties

-
+
+
+
+
defaultStateHandler +
Link copied to clipboard
+
+
+
+
common
+
+
+
var defaultStateHandler: StatesHandler<T, T>?
+
+
+
+
+
statesManager @@ -102,52 +178,12 @@
common
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
-

Extensions

-
-
-
-
onStateOrSubstate -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
-
-
-
-
-
-
- -
-
-
strictlyOn -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
-
-
-
-
-
-
-
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/on-state-or-substate.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/on-state-or-substate.html new file mode 100644 index 00000000000..7cd6e90526c --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/on-state-or-substate.html @@ -0,0 +1,39 @@ + + + + onStateOrSubstate + + +
+
+ + +
+
+
+
+
+
+ +
+

onStateOrSubstate

+
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/states-manager.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/states-manager.html index c28f1f8a1f1..135aaa4df2f 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/states-manager.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/states-manager.html @@ -27,7 +27,7 @@
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/strictly-on.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/strictly-on.html new file mode 100644 index 00000000000..b868908b89b --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]-f-s-m-builder/strictly-on.html @@ -0,0 +1,39 @@ + + + + strictlyOn + + +
+
+ + +
+
+
+
+
+
+ +
+

strictlyOn

+
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]build-f-s-m.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]build-f-s-m.html index d1a9456b546..9f72319a4be 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]build-f-s-m.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[common]build-f-s-m.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/get-active-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/default-state-handler.html similarity index 74% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/get-active-states.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/default-state-handler.html index cf66d137c99..69873681843 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-states-manager/get-active-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/default-state-handler.html @@ -1,7 +1,7 @@ - getActiveStates + defaultStateHandler
@@ -13,21 +13,21 @@
-
+
-

getActiveStates

+

defaultStateHandler

-
open suspend override fun getActiveStates(): List<State>
+
var defaultStateHandler: StatesHandler<T, T>?
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/do-when.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/do-when.html new file mode 100644 index 00000000000..5d10b2c632d --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/do-when.html @@ -0,0 +1,39 @@ + + + + doWhen + + +
+
+ + +
+
+
+
+
+
+ +
+

doWhen

+
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/index.html index 26697213869..979987e3167 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/index.html @@ -17,22 +17,22 @@

FSMBuilder

-
class FSMBuilder(statesManager: StatesManager)
+
class FSMBuilder<T : State>(statesManager: StatesManager<T>, defaultStateHandler: StatesHandler<T, T>?)
-
+

Functions

-
+
-
add +
add
Link copied to clipboard
@@ -42,17 +42,17 @@
-
fun <I : State> add(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> add(filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
fun <I : T> add(kClass: KClass<I>, handler: StatesHandler<I, T>)
- +
-
addStrict +
addStrict
Link copied to clipboard
@@ -62,7 +62,7 @@
-
fun <I : State> addStrict(kClass: KClass<I>, handler: StatesHandler<I>)
+
fun <I : T> addStrict(kClass: KClass<I>, handler: StatesHandler<I, T>)
@@ -82,7 +82,67 @@
-
fun build(): DefaultStatesMachine
+
fun build(): DefaultStatesMachine<T>
+
+
+
+
+
+
+ +
+
+
doWhen +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> doWhen(noinline filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
onStateOrSubstate +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+
+
+
+ +
+
+
strictlyOn +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
@@ -91,7 +151,23 @@

Properties

-
+
+
+
+
defaultStateHandler +
Link copied to clipboard
+
+
+
+ +
+
+
var defaultStateHandler: StatesHandler<T, T>?
+
+
+
+
+
statesManager @@ -102,52 +178,12 @@
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
-

Extensions

-
-
-
-
onStateOrSubstate -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
-
-
-
-
-
-
- -
-
-
strictlyOn -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
-
-
-
-
-
-
-
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/on-state-or-substate.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/on-state-or-substate.html new file mode 100644 index 00000000000..148fc20824b --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/on-state-or-substate.html @@ -0,0 +1,39 @@ + + + + onStateOrSubstate + + +
+
+ + +
+
+
+
+
+
+ +
+

onStateOrSubstate

+
+
+ +
+
inline fun <I : T> onStateOrSubstate(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/states-manager.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/states-manager.html index 9b84336de33..65f66748b94 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/states-manager.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/states-manager.html @@ -27,7 +27,7 @@
-
var statesManager: StatesManager
+
var statesManager: StatesManager<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/strictly-on.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/strictly-on.html new file mode 100644 index 00000000000..d5b83cf1f24 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]-f-s-m-builder/strictly-on.html @@ -0,0 +1,39 @@ + + + + strictlyOn + + +
+
+ + +
+
+
+
+
+
+ +
+

strictlyOn

+
+
+ +
+
inline fun <I : T> strictlyOn(handler: StatesHandler<I, T>)
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]build-f-s-m.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]build-f-s-m.html index ad73722f6c0..ee12dc2d6c1 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]build-f-s-m.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.dsl/[jvm]build-f-s-m.html @@ -13,7 +13,7 @@
-
+
@@ -49,10 +49,10 @@

Functions

-
+
-
buildFSM +
buildFSM
Link copied to clipboard
@@ -61,45 +61,7 @@
-
fun buildFSM(block: FSMBuilder.() -> Unit): StatesMachine
fun buildFSM(block: FSMBuilder.() -> Unit): StatesMachine
fun buildFSM(block: FSMBuilder.() -> Unit): StatesMachine
-
-
-
-
-
-
- -
-
-
onStateOrSubstate -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.onStateOrSubstate(handler: StatesHandler<I>)
-
-
-
-
-
-
- -
-
-
strictlyOn -
Link copied to clipboard
-
-
-
- -
-
-
-
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
inline fun <I : State> FSMBuilder.strictlyOn(handler: StatesHandler<I>)
+
fun <T : State> buildFSM(block: FSMBuilder<T>.() -> Unit): StatesMachine<T>
fun <T : State> buildFSM(block: FSMBuilder<T>.() -> Unit): StatesMachine<T>
fun <T : State> buildFSM(block: FSMBuilder<T>.() -> Unit): StatesMachine<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-context-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-context-state.html index c1c02e68da4..e233293c798 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-context-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-context-state.html @@ -27,7 +27,7 @@
-
abstract suspend fun getContextState(context: Any): State?
+
abstract suspend fun getContextState(context: Any): T?

Return

Current state by context

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-states.html index d9e6957b2f8..e77cf55ea1c 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/index.html index 9bb341827d5..d8fcd15b5a3 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/index.html @@ -23,7 +23,7 @@

DefaultStatesManagerRepo

-
interface DefaultStatesManagerRepo

Implement this repo if you want to use some custom repo for DefaultStatesManager

+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -62,7 +62,7 @@
-
abstract suspend fun getContextState(context: Any): State?
+
abstract suspend fun getContextState(context: Any): T?
@@ -82,17 +82,17 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -102,17 +102,17 @@
-
abstract suspend fun removeState(state: State)
+
abstract suspend fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -122,7 +122,7 @@
-
abstract suspend fun set(state: State)
+
abstract suspend fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/remove-state.html index 36e709d73a5..5a002ff7547 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/end-chain.html index 05d635189be..b0fe69e0693 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/end-chain.html @@ -13,7 +13,7 @@
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/index.html index 85a19c17f8b..2b7e3bb750c 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/index.html @@ -23,7 +23,7 @@

DefaultStatesManager

-
class DefaultStatesManager(repo: DefaultStatesManagerRepo, onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
+
class DefaultStatesManager<T : State>(repo: DefaultStatesManagerRepo<T>, onContextsConflictResolver: suspend (T, T, T) -> Boolean) : StatesManager<T>
@@ -33,10 +33,10 @@
repo

This repo will be used as repository for storing states. All operations with this repo will happen BEFORE any event will be sent to onChainStateUpdated, onStartChain or onEndChain. By default will be used InMemoryDefaultStatesManagerRepo or you may create custom DefaultStatesManagerRepo and pass as repo parameter

onContextsConflictResolver

Receive old State, new one and the state currently placed on new State.context key. In case when this callback will returns true, the state placed on State.context of new will be replaced by new state by using endChain with that state

Constructors

-
+
-
DefaultStatesManager +
DefaultStatesManager
Link copied to clipboard
@@ -44,17 +44,17 @@
-
fun DefaultStatesManager(repo: DefaultStatesManagerRepo = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean = { _, _, _ -> true })
+
fun <T : State> DefaultStatesManager(repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (T, T, T) -> Boolean = { _, _, _ -> true })

Functions

-
+
-
endChain +
endChain
Link copied to clipboard
@@ -64,7 +64,7 @@
-
open suspend override fun endChain(state: State)
+
open suspend override fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

@@ -84,17 +84,17 @@
-
open suspend override fun getActiveStates(): List<State>
+
open suspend override fun getActiveStates(): List<T>
- +
-
startChain +
startChain
Link copied to clipboard
@@ -104,17 +104,17 @@
-
open suspend override fun startChain(state: State)
+
open suspend override fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

- +
-
update +
update
Link copied to clipboard
@@ -124,7 +124,7 @@
-
open suspend override fun update(old: State, new: State)
+
open suspend override fun update(old: T, new: T)

Must set current set using State.context

@@ -144,7 +144,7 @@
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
@@ -160,7 +160,7 @@
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
@@ -176,7 +176,7 @@
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-chain-state-updated.html index 3ecbefe7393..d0aecd9b812 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-chain-state-updated.html @@ -27,7 +27,7 @@
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-end-chain.html index 2646b74c2b4..22673da30eb 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-end-chain.html @@ -27,7 +27,7 @@
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-start-chain.html index e95d08428bb..2071ef1cde7 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/on-start-chain.html @@ -27,7 +27,7 @@
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/start-chain.html index e04a8dcd57b..0c75bcf6de2 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-default-states-manager/start-chain.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/get-states.html index 1b7c6c05d34..2bcd97259a1 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/index.html index d1a4c5f3717..1e23fdb7e45 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/index.html @@ -23,16 +23,16 @@

InMemoryDefaultStatesManagerRepo

-

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

+
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

Constructors

-
+
-
InMemoryDefaultStatesManagerRepo +
InMemoryDefaultStatesManagerRepo
Link copied to clipboard
@@ -40,7 +40,7 @@
-
fun InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, State> = mutableMapOf())
+
fun <T : State> InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, T> = mutableMapOf())
@@ -80,7 +80,7 @@
-
open suspend override fun getContextState(context: Any): State?
+
open suspend override fun getContextState(context: Any): T?
@@ -100,17 +100,17 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -120,17 +120,17 @@
-
open suspend override fun removeState(state: State)
+
open suspend override fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -140,7 +140,7 @@
-
open suspend override fun set(state: State)
+
open suspend override fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/remove-state.html index 1daae4d81e2..2c15d686989 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/get-states.html index 1b0fc6ea49d..8c68295fd6f 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/index.html index ca826213cf7..886a972b57b 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/index.html @@ -23,7 +23,7 @@

DefaultStatesManagerRepo

-
interface DefaultStatesManagerRepo

Implement this repo if you want to use some custom repo for DefaultStatesManager

+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -62,7 +62,7 @@
-
abstract suspend fun getContextState(context: Any): State?
+
abstract suspend fun getContextState(context: Any): T?
@@ -82,17 +82,17 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -102,17 +102,17 @@
-
abstract suspend fun removeState(state: State)
+
abstract suspend fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -122,7 +122,7 @@
-
abstract suspend fun set(state: State)
+
abstract suspend fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/remove-state.html index a08187787e5..0bb2a8b6be8 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/end-chain.html index e846d089d7b..de5e5cdedc2 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/end-chain.html @@ -13,7 +13,7 @@
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/index.html index 22206b4ba45..45e23c12ee5 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/index.html @@ -23,7 +23,7 @@

DefaultStatesManager

-
class DefaultStatesManager(repo: DefaultStatesManagerRepo, onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
+
class DefaultStatesManager<T : State>(repo: DefaultStatesManagerRepo<T>, onContextsConflictResolver: suspend (T, T, T) -> Boolean) : StatesManager<T>
@@ -33,10 +33,10 @@
repo

This repo will be used as repository for storing states. All operations with this repo will happen BEFORE any event will be sent to onChainStateUpdated, onStartChain or onEndChain. By default will be used InMemoryDefaultStatesManagerRepo or you may create custom DefaultStatesManagerRepo and pass as repo parameter

onContextsConflictResolver

Receive old State, new one and the state currently placed on new State.context key. In case when this callback will returns true, the state placed on State.context of new will be replaced by new state by using endChain with that state

Constructors

-
+
-
DefaultStatesManager +
DefaultStatesManager
Link copied to clipboard
@@ -44,17 +44,17 @@
common
-
fun DefaultStatesManager(repo: DefaultStatesManagerRepo = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean = { _, _, _ -> true })
+
fun <T : State> DefaultStatesManager(repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (T, T, T) -> Boolean = { _, _, _ -> true })

Functions

-
+
-
endChain +
endChain
Link copied to clipboard
@@ -64,7 +64,7 @@
-
open suspend override fun endChain(state: State)
+
open suspend override fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

@@ -84,17 +84,17 @@
-
open suspend override fun getActiveStates(): List<State>
+
open suspend override fun getActiveStates(): List<T>
- +
-
startChain +
startChain
Link copied to clipboard
@@ -104,17 +104,17 @@
-
open suspend override fun startChain(state: State)
+
open suspend override fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

- +
-
update +
update
Link copied to clipboard
@@ -124,7 +124,7 @@
-
open suspend override fun update(old: State, new: State)
+
open suspend override fun update(old: T, new: T)

Must set current set using State.context

@@ -144,7 +144,7 @@
common
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
@@ -160,7 +160,7 @@
common
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
@@ -176,7 +176,7 @@
common
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-chain-state-updated.html index 569568b513e..065690f3f4e 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-chain-state-updated.html @@ -27,7 +27,7 @@
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-end-chain.html index 0a62fad3960..cef8681cc15 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-end-chain.html @@ -27,7 +27,7 @@
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-start-chain.html index 90daad85610..1a21ee348cb 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/on-start-chain.html @@ -27,7 +27,7 @@
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/start-chain.html index 07eb3cacfaf..d71703f16b0 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-default-states-manager/start-chain.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/get-states.html index 884f25ab450..cda2e616857 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/index.html index 26131d52a2e..62edb7b7031 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/index.html @@ -23,16 +23,16 @@

InMemoryDefaultStatesManagerRepo

-

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

+
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

Constructors

-
+
-
InMemoryDefaultStatesManagerRepo +
InMemoryDefaultStatesManagerRepo
Link copied to clipboard
@@ -40,7 +40,7 @@
common
-
fun InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, State> = mutableMapOf())
+
fun <T : State> InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, T> = mutableMapOf())
@@ -80,7 +80,7 @@
-
open suspend override fun getContextState(context: Any): State?
+
open suspend override fun getContextState(context: Any): T?
@@ -100,17 +100,17 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -120,17 +120,17 @@
-
open suspend override fun removeState(state: State)
+
open suspend override fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -140,7 +140,7 @@
-
open suspend override fun set(state: State)
+
open suspend override fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/remove-state.html index f4f5156bf74..be0755d7fca 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[common]-in-memory-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/get-states.html index ff474fa776a..b362e96cf31 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/index.html index 055a4a52622..1af19812cfd 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/index.html @@ -23,7 +23,7 @@

DefaultStatesManagerRepo

-
interface DefaultStatesManagerRepo

Implement this repo if you want to use some custom repo for DefaultStatesManager

+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -62,7 +62,7 @@
-
abstract suspend fun getContextState(context: Any): State?
+
abstract suspend fun getContextState(context: Any): T?
@@ -82,17 +82,17 @@
-
abstract suspend fun getStates(): List<State>
+
abstract suspend fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -102,17 +102,17 @@
-
abstract suspend fun removeState(state: State)
+
abstract suspend fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -122,7 +122,7 @@
-
abstract suspend fun set(state: State)
+
abstract suspend fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/remove-state.html index 0215546c295..8fc55c0dcd6 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/end-chain.html index a0233ef62a0..6f6bc51dfc7 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/end-chain.html @@ -13,7 +13,7 @@
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/index.html index e74e13e55b2..590613bbc27 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/index.html @@ -23,7 +23,7 @@

DefaultStatesManager

-
class DefaultStatesManager(repo: DefaultStatesManagerRepo, onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
+
class DefaultStatesManager<T : State>(repo: DefaultStatesManagerRepo<T>, onContextsConflictResolver: suspend (T, T, T) -> Boolean) : StatesManager<T>
@@ -33,10 +33,10 @@
repo

This repo will be used as repository for storing states. All operations with this repo will happen BEFORE any event will be sent to onChainStateUpdated, onStartChain or onEndChain. By default will be used InMemoryDefaultStatesManagerRepo or you may create custom DefaultStatesManagerRepo and pass as repo parameter

onContextsConflictResolver

Receive old State, new one and the state currently placed on new State.context key. In case when this callback will returns true, the state placed on State.context of new will be replaced by new state by using endChain with that state

Constructors

-
+
-
DefaultStatesManager +
DefaultStatesManager
Link copied to clipboard
@@ -44,17 +44,17 @@
-
fun DefaultStatesManager(repo: DefaultStatesManagerRepo = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean = { _, _, _ -> true })
+
fun <T : State> DefaultStatesManager(repo: DefaultStatesManagerRepo<T> = InMemoryDefaultStatesManagerRepo(), onContextsConflictResolver: suspend (T, T, T) -> Boolean = { _, _, _ -> true })

Functions

-
+
-
endChain +
endChain
Link copied to clipboard
@@ -64,7 +64,7 @@
-
open suspend override fun endChain(state: State)
+
open suspend override fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

@@ -84,17 +84,17 @@
-
open suspend override fun getActiveStates(): List<State>
+
open suspend override fun getActiveStates(): List<T>
- +
-
startChain +
startChain
Link copied to clipboard
@@ -104,17 +104,17 @@
-
open suspend override fun startChain(state: State)
+
open suspend override fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

- +
-
update +
update
Link copied to clipboard
@@ -124,7 +124,7 @@
-
open suspend override fun update(old: State, new: State)
+
open suspend override fun update(old: T, new: T)

Must set current set using State.context

@@ -144,7 +144,7 @@
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
@@ -160,7 +160,7 @@
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
@@ -176,7 +176,7 @@
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-chain-state-updated.html index 664788a169a..b025767a9fd 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-chain-state-updated.html @@ -27,7 +27,7 @@
-
open override val onChainStateUpdated: Flow<Pair<State, State>>
+
open override val onChainStateUpdated: Flow<Pair<T, T>>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-end-chain.html index c87c3ca8d92..8530d49931f 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-end-chain.html @@ -27,7 +27,7 @@
-
open override val onEndChain: Flow<State>
+
open override val onEndChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-start-chain.html index bee40923390..deef758badc 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/on-start-chain.html @@ -27,7 +27,7 @@
-
open override val onStartChain: Flow<State>
+
open override val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/start-chain.html index aa4e0cc2d38..6c6d1b0db95 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-default-states-manager/start-chain.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/get-states.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/get-states.html index cdfd4648592..ad82bef9b66 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/get-states.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/get-states.html @@ -27,7 +27,7 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>

Return

Current list of available and saved states

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/index.html index 73ef3417538..38ba4896862 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/index.html @@ -23,16 +23,16 @@

InMemoryDefaultStatesManagerRepo

-

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

+
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

Constructors

-
+
-
InMemoryDefaultStatesManagerRepo +
InMemoryDefaultStatesManagerRepo
Link copied to clipboard
@@ -40,7 +40,7 @@
-
fun InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, State> = mutableMapOf())
+
fun <T : State> InMemoryDefaultStatesManagerRepo(map: MutableMap<Any, T> = mutableMapOf())
@@ -80,7 +80,7 @@
-
open suspend override fun getContextState(context: Any): State?
+
open suspend override fun getContextState(context: Any): T?
@@ -100,17 +100,17 @@
-
open suspend override fun getStates(): List<State>
+
open suspend override fun getStates(): List<T>
- +
-
removeState +
removeState
Link copied to clipboard
@@ -120,17 +120,17 @@
-
open suspend override fun removeState(state: State)
+
open suspend override fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

- +
-
set +
set
Link copied to clipboard
@@ -140,7 +140,7 @@
-
open suspend override fun set(state: State)
+
open suspend override fun set(state: T)

Must save state as current state of chain with State.context of state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/remove-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/remove-state.html index f7e9d152230..d6f145a1756 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/remove-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[jvm]-in-memory-default-states-manager-repo/remove-state.html @@ -13,7 +13,7 @@
-
+
-
+
@@ -61,7 +61,7 @@
-
interface DefaultStatesManagerRepo
+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -71,7 +71,7 @@
-
interface DefaultStatesManagerRepo
+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -81,7 +81,7 @@
-
interface DefaultStatesManagerRepo
+
interface DefaultStatesManagerRepo<T : State>

Implement this repo if you want to use some custom repo for DefaultStatesManager

@@ -102,7 +102,7 @@
- +
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

@@ -112,7 +112,7 @@
- +
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

@@ -122,28 +122,9 @@
- +
class InMemoryDefaultStatesManagerRepo<T : State>(map: MutableMap<Any, T>) : DefaultStatesManagerRepo<T>

Simple DefaultStatesManagerRepo for DefaultStatesManager which will store data in map and use primitive functionality

-
-
-
-
- -
-
-
InMemoryStatesManager -
Link copied to clipboard
-
-
-
- -
-
-
-
class InMemoryStatesManager(onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
class InMemoryStatesManager(onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
class InMemoryStatesManager(onContextsConflictResolver: suspend (old: State, new: State, currentNew: State) -> Boolean) : StatesManager
-
-
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder.html new file mode 100644 index 00000000000..4d742d608ab --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder.html @@ -0,0 +1,39 @@ + + + + [android]CheckableHandlerHolder + + +
+
+ + +
+
+
+
+
+
+ +
+

CheckableHandlerHolder

+
+
+ +
+
fun <I : O, O : State> CheckableHandlerHolder(inputKlass: KClass<I>, strict: Boolean = false, delegateTo: StatesHandler<I, O>): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> CheckableHandlerHolder(strict: Boolean = false, delegateTo: StatesHandler<I, O>): CustomizableHandlerHolder<O, O>
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/check-handleable.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/check-handleable.html new file mode 100644 index 00000000000..2cdbb2e1be4 --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/check-handleable.html @@ -0,0 +1,39 @@ + + + + checkHandleable + + +
+
+ + +
+
+
+
+
+
+ +
+

checkHandleable

+
+
+ +
+
abstract suspend fun checkHandleable(state: O): Boolean
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/index.html new file mode 100644 index 00000000000..3c8b132425d --- /dev/null +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-checkable-handler-holder/index.html @@ -0,0 +1,92 @@ + + + + [android]CheckableHandlerHolder + + +
+
+ + +
+
+
+
+
+
+ +
+

CheckableHandlerHolder

+
interface CheckableHandlerHolder<I : State, O : State> : StatesHandler<I, O>

Define checkable holder which can be used to precheck that this handler may handle incoming State

+
+
+
+
+

Functions

+
+
+
+
checkHandleable +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
abstract suspend fun checkHandleable(state: O): Boolean
+
+
+
+
+
+
+ +
+
+
handleState +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
abstract suspend fun StatesMachine<in O>.handleState(state: I): O?
+
+

Main handling of state. In case when this state leads to another State and handleState returns not null State it is assumed that chain is not completed.

+
+
+
+
+
+

Inheritors

+
+
+
+
CustomizableHandlerHolder +
Link copied to clipboard
+
+
+
+
+
+
+
+
+ +
+
+ + + diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/-state-handler-holder.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/-customizable-handler-holder.html similarity index 65% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/-state-handler-holder.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/-customizable-handler-holder.html index 253f3ed9abc..57abff45672 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/-state-handler-holder.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/-customizable-handler-holder.html @@ -1,7 +1,7 @@ - StateHandlerHolder + CustomizableHandlerHolder
@@ -13,21 +13,21 @@
-
+
-

StateHandlerHolder

+

CustomizableHandlerHolder

-
fun <I : State> StateHandlerHolder(inputKlass: KClass<I>, strict: Boolean = false, delegateTo: StatesHandler<I>)
+
fun <I : O, O : State> CustomizableHandlerHolder(delegateTo: StatesHandler<I, O>, filter: suspend (O) -> Boolean)
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/check-handleable.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/check-handleable.html similarity index 68% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/check-handleable.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/check-handleable.html index a551768f43c..91a0b69b46a 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/check-handleable.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/check-handleable.html @@ -13,9 +13,9 @@
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/handle-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/handle-state.html similarity index 71% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/handle-state.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/handle-state.html index 3af3d1e1b2e..f9d25c56f29 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/handle-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/handle-state.html @@ -13,9 +13,9 @@
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/index.html similarity index 58% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/index.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/index.html index 4c705c3efb8..e520606ad46 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-state-handler-holder/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-customizable-handler-holder/index.html @@ -1,7 +1,7 @@ - [android]StateHandlerHolder + [android]CustomizableHandlerHolder
@@ -13,26 +13,26 @@
-
+
-

StateHandlerHolder

-
class StateHandlerHolder<I : State>(inputKlass: KClass<I>, strict: Boolean, delegateTo: StatesHandler<I>) : StatesHandler<State>

Default realization of StatesHandler. It will incapsulate checking of State type in checkHandleable and class casting in handleState

+

CustomizableHandlerHolder

+
class CustomizableHandlerHolder<I : O, O : State>(delegateTo: StatesHandler<I, O>, filter: suspend (O) -> Boolean) : CheckableHandlerHolder<I, O>

Default realization of StatesHandler. It will incapsulate checking of State type in checkHandleable and class casting in handleState

Constructors

-
+
-
StateHandlerHolder +
CustomizableHandlerHolder
Link copied to clipboard
@@ -40,17 +40,17 @@
-
fun <I : State> StateHandlerHolder(inputKlass: KClass<I>, strict: Boolean = false, delegateTo: StatesHandler<I>)
+
fun <I : O, O : State> CustomizableHandlerHolder(delegateTo: StatesHandler<I, O>, filter: suspend (O) -> Boolean)

Functions

-
+
-
checkHandleable +
checkHandleable
Link copied to clipboard
@@ -60,17 +60,17 @@
-
fun checkHandleable(state: State): Boolean
+
open suspend override fun checkHandleable(state: O): Boolean
-

Checks that state can be handled by delegateTo. Under the hood it will check exact equality of state and use KClass.isInstance of inputKlass if strict == false

+

Checks that state can be handled by delegateTo. Under the hood it will check exact equality of state and use KClass.isInstance of inputKlass if strict == false

- +
-
handleState +
handleState
Link copied to clipboard
@@ -80,9 +80,9 @@
-
open suspend override fun StatesMachine.handleState(state: State): State?
+
open suspend override fun StatesMachine<in O>.handleState(state: I): O?
-

Calls delegateTo method StatesHandler.handleState with state casted to I. Use checkHandleable to be sure that this StateHandlerHolder will be able to handle state

+

Calls delegateTo method StatesHandler.handleState with state casted to I. Use checkHandleable to be sure that this StatesHandlerHolder will be able to handle state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/-default-states-machine.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/-default-states-machine.html index b0516fb70a6..7866b8b21ce 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/-default-states-machine.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/-default-states-machine.html @@ -13,7 +13,7 @@
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/index.html index d46f44132eb..f142da95d47 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/index.html @@ -23,16 +23,16 @@

DefaultStatesMachine

-
class DefaultStatesMachine(statesManager: StatesManager, handlers: List<StateHandlerHolder<*>>) : StatesMachine

Default realization of StatesMachine. It uses statesManager for incapsulation of States storing and contexts resolving, and uses launchStateHandling for State handling

+
class DefaultStatesMachine<T : State>(statesManager: StatesManager<T>, handlers: List<CustomizableHandlerHolder<in T, T>>) : StatesMachine<T>

Default realization of StatesMachine. It uses statesManager for incapsulation of States storing and contexts resolving, and uses launchStateHandling for State handling

Constructors

-
+
-
DefaultStatesMachine +
DefaultStatesMachine
Link copied to clipboard
@@ -40,17 +40,17 @@
-
fun DefaultStatesMachine(statesManager: StatesManager, handlers: List<StateHandlerHolder<*>>)
+
fun <T : State> DefaultStatesMachine(statesManager: StatesManager<T>, handlers: List<CustomizableHandlerHolder<in T, T>>)

Functions

-
+
-
handleState +
handleState
Link copied to clipboard
@@ -60,9 +60,29 @@
-
open suspend override fun StatesMachine.handleState(state: State): State?
+
open suspend override fun StatesMachine<in T>.handleState(state: T): T?
-

Will call launchStateHandling for state handling

+

Will call launchStateHandling for state handling

+
+
+
+
+ +
+
+
launchStateHandling +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open suspend fun launchStateHandling(state: T, handlers: List<CustomizableHandlerHolder<in T, T>>): T?
+
+
@@ -82,15 +102,15 @@
open override fun start(scope: CoroutineScope): Job
-

Launch handling of states. On statesManager, statesManager will be called lambda with performing of state. If launchStateHandling will returns some State then statesManager will be used, otherwise StatesManager.endChain.

+

Launch handling of states. On statesManager, statesManager will be called lambda with performing of state. If launchStateHandling will returns some State then statesManager will be used, otherwise StatesManager.endChain.

- +
-
startChain +
startChain
Link copied to clipboard
@@ -100,7 +120,7 @@
-
open suspend override fun startChain(state: State)
+
open suspend override fun startChain(state: T)

Just calls StatesManager.startChain of statesManager

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/start-chain.html index 0513803aa06..d9664802567 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-default-states-machine/start-chain.html @@ -13,7 +13,7 @@
-
+
+

Launch handling of states. On statesManager, statesManager will be called lambda with performing of state. If launchStateHandling will returns some State then statesManager will be used, otherwise StatesManager.endChain.

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-handler/handle-state.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-handler/handle-state.html index 246a075611f..14061731bad 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-handler/handle-state.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-handler/handle-state.html @@ -13,7 +13,7 @@
-
+

StatesHandler

-
fun interface StatesHandler<I : State>

Default realization of states handler

+
fun interface StatesHandler<I : State, O : State>

Default realization of states handler

-
+

Functions

-
+
-
handleState +
handleState
Link copied to clipboard
@@ -42,7 +42,7 @@
-
abstract suspend fun StatesMachine.handleState(state: I): State?
+
abstract suspend fun StatesMachine<in O>.handleState(state: I): O?

Main handling of state. In case when this state leads to another State and handleState returns not null State it is assumed that chain is not completed.

@@ -51,10 +51,10 @@

Inheritors

-
+
-
StateHandlerHolder +
CheckableHandlerHolder
Link copied to clipboard
@@ -70,6 +70,27 @@
+

Extensions

+
+
+
+
holder +
Link copied to clipboard
+
+
+
+ +
+
+
+
inline fun <I : O, O : State> StatesHandler<I, O>.holder(strict: Boolean = true): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> StatesHandler<I, O>.holder(noinline filter: suspend (state: State) -> Boolean): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> StatesHandler<I, O>.holder(strict: Boolean = true): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> StatesHandler<I, O>.holder(noinline filter: suspend (state: State) -> Boolean): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> StatesHandler<I, O>.holder(strict: Boolean = true): CustomizableHandlerHolder<O, O>
inline fun <I : O, O : State> StatesHandler<I, O>.holder(noinline filter: suspend (state: State) -> Boolean): CustomizableHandlerHolder<O, O>
+
+
+
+
+
+
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/index.html index dcf0def7bf1..b6db42c2705 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/index.html @@ -29,10 +29,10 @@

Functions

-
+
-
invoke +
invoke
Link copied to clipboard
@@ -42,7 +42,7 @@
-
operator fun invoke(statesManager: StatesManager, handlers: List<StateHandlerHolder<*>>): DefaultStatesMachine
+
operator fun <T : State> invoke(statesManager: StatesManager<T>, handlers: List<CustomizableHandlerHolder<in T, T>>): DefaultStatesMachine<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/invoke.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/invoke.html index 65ea9ae1340..f2258906903 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/invoke.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/-companion/invoke.html @@ -13,7 +13,7 @@
-
+

StatesMachine

-
interface StatesMachine : StatesHandler<State>

Default StatesMachine may startChain and use inside logic for handling States. By default you may use DefaultStatesMachine or build it with dev.inmo.micro_utils.fsm.common.dsl.buildFSM. Implementers MUST NOT start handling until start method will be called

+
interface StatesMachine<T : State> : StatesHandler<T, T>

Default StatesMachine may startChain and use inside logic for handling States. By default you may use DefaultStatesMachine or build it with dev.inmo.micro_utils.fsm.common.dsl.buildFSM. Implementers MUST NOT start handling until start method will be called

@@ -51,10 +51,10 @@

Functions

-
+
-
handleState +
handleState
Link copied to clipboard
@@ -64,9 +64,29 @@
-
abstract suspend fun StatesMachine.handleState(state: State): State?
+
abstract suspend fun StatesMachine<in T>.handleState(state: T): T?
-

Main handling of state. In case when this state leads to another State and handleState returns not null State it is assumed that chain is not completed.

+

Main handling of state. In case when this state leads to another State and handleState returns not null State it is assumed that chain is not completed.

+
+
+
+
+ +
+
+
launchStateHandling +
Link copied to clipboard
+
+
+
+ +
+
+ +
+
open suspend fun launchStateHandling(state: T, handlers: List<CustomizableHandlerHolder<in T, T>>): T?
+
+
@@ -91,10 +111,10 @@
- +
-
startChain +
startChain
Link copied to clipboard
@@ -104,7 +124,7 @@
-
abstract suspend fun startChain(state: State)
+
abstract suspend fun startChain(state: T)

Start chain of States witn state

diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/launch-state-handling.html similarity index 70% rename from micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/start-chain.html rename to micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/launch-state-handling.html index c54c6328fe1..a842b9200d9 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common.managers/[android]-in-memory-states-manager/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/launch-state-handling.html @@ -1,7 +1,7 @@ - startChain + launchStateHandling
@@ -13,23 +13,23 @@
-
+
-

startChain

+

launchStateHandling

-
open suspend override fun startChain(state: State)
+
open suspend fun launchStateHandling(state: T, handlers: List<CustomizableHandlerHolder<in T, T>>): T?
-

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/start-chain.html index 9025ed135ec..3e731e299d1 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-machine/start-chain.html @@ -13,7 +13,7 @@
-
+
-
+
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/index.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/index.html index cfd809dd8d5..3ee87f6d807 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/index.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/index.html @@ -23,16 +23,16 @@

StatesManager

-
interface StatesManager
+
interface StatesManager<T : State>

Functions

-
+
-
endChain +
endChain
Link copied to clipboard
@@ -42,7 +42,7 @@
-
abstract suspend fun endChain(state: State)
+
abstract suspend fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

@@ -62,17 +62,17 @@
-
abstract suspend fun getActiveStates(): List<State>
+
abstract suspend fun getActiveStates(): List<T>
- +
-
startChain +
startChain
Link copied to clipboard
@@ -82,17 +82,17 @@
-
abstract suspend fun startChain(state: State)
+
abstract suspend fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

- +
-
update +
update
Link copied to clipboard
@@ -102,7 +102,7 @@
-
abstract suspend fun update(old: State, new: State)
+
abstract suspend fun update(old: T, new: T)

Must set current set using State.context

@@ -122,7 +122,7 @@
-
abstract val onChainStateUpdated: Flow<Pair<State, State>>
+
abstract val onChainStateUpdated: Flow<Pair<T, T>>
@@ -138,7 +138,7 @@
-
abstract val onEndChain: Flow<State>
+
abstract val onEndChain: Flow<T>
@@ -154,7 +154,7 @@
-
abstract val onStartChain: Flow<State>
+
abstract val onStartChain: Flow<T>
@@ -170,15 +170,6 @@
- -
-
-
InMemoryStatesManager -
Link copied to clipboard
-
-
-
-
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-chain-state-updated.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-chain-state-updated.html index 9cdc4c3a21d..24342cad58c 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-chain-state-updated.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-chain-state-updated.html @@ -27,7 +27,7 @@
-
abstract val onChainStateUpdated: Flow<Pair<State, State>>
+
abstract val onChainStateUpdated: Flow<Pair<T, T>>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-end-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-end-chain.html index 9a771d128d5..1d5e62239f9 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-end-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-end-chain.html @@ -27,7 +27,7 @@
-
abstract val onEndChain: Flow<State>
+
abstract val onEndChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-start-chain.html index ae08c6c5e54..77270c7e23c 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/on-start-chain.html @@ -27,7 +27,7 @@
-
abstract val onStartChain: Flow<State>
+
abstract val onStartChain: Flow<T>
diff --git a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/start-chain.html b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/start-chain.html index 70ca69394f2..d6573c5b630 100644 --- a/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/start-chain.html +++ b/micro_utils.dokka/dev.inmo.micro_utils.fsm.common/[android]-states-manager/start-chain.html @@ -13,7 +13,7 @@
-
+
-
+