Skip to content

Commit

Permalink
updates README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vitkhudenko committed Oct 23, 2019
1 parent b0191a7 commit f4bd002
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ allprojects {
At a module level `build.gradle`, add the following dependency:

```groovy
implementation 'vit.khudenko.android:fsm:0.1.0'
implementation 'vit.khudenko.android:fsm:0.2.0'
```

### Usage
Expand Down Expand Up @@ -49,9 +49,11 @@ val sessionStateMachine = StateMachine.Builder<Session.Event, Session.State>()
.build()
```

Meaning of such sample configuration is that there are 3 possible session states
(`ACTIVE`, `INACTIVE` and `FORGOTTEN`) and 3 possible events (`LOGIN`, `LOGOUT` and `LOGOUT_AND_FORGET`).
And using these events and states there are possible 3 state machine transitions:
Meaning of the above sample configuration is that:
* There are 3 possible session states (`ACTIVE`, `INACTIVE` and `FORGOTTEN`).
* There are 3 possible events (`LOGIN`, `LOGOUT` and `LOGOUT_AND_FORGET`).
* StateMachine's initial state is `ACTIVE`.
* There are 3 possible state machine transitions:

|Event |State path |
|-------------------|------------------------|
Expand Down

0 comments on commit f4bd002

Please sign in to comment.