public interface Stateful<S extends java.lang.Enum>
A stateful component that changes its state and notifies subscribed parties.
rx.Observable<S> states()
Returns a infinite observable which gets updated when the state of the component changes.
Observable
updated with state transitions.S state()
Returns the current state.
boolean isState(S state)
Check if the given state is the same as the current one.
state
- the stats to check against.