Package org.reactfx
Class ObservableStateBuilderImpl<S>
java.lang.Object
org.reactfx.ObservableStateBuilderImpl<S>
- All Implemented Interfaces:
StateMachine.ObservableStateBuilder<S>
class ObservableStateBuilderImpl<S>
extends Object
implements StateMachine.ObservableStateBuilder<S>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObservableStateBuilderImpl
(S initialState, LL<TransitionBuilder<S>> transitions) -
Method Summary
Modifier and TypeMethodDescriptionon
(EventStream<I> input) javafx.beans.binding.Binding
<S> Returns a binding that reflects the current state of the state machine.Returns an event stream that emits the current state of the state machine every time it changes.
-
Field Details
-
initialState
-
transitions
-
-
Constructor Details
-
ObservableStateBuilderImpl
ObservableStateBuilderImpl(S initialState, LL<TransitionBuilder<S>> transitions)
-
-
Method Details
-
on
- Specified by:
on
in interfaceStateMachine.ObservableStateBuilder<S>
-
toStateStream
Description copied from interface:StateMachine.ObservableStateBuilder
Returns an event stream that emits the current state of the state machine every time it changes.- Specified by:
toStateStream
in interfaceStateMachine.ObservableStateBuilder<S>
-
toObservableState
Description copied from interface:StateMachine.ObservableStateBuilder
Returns a binding that reflects the current state of the state machine. Disposing the returned binding (by calling itsdispose()
method) causes the state machine to unsubscribe from the event streams that alter its state and allows the state machine to be garbage collected.- Specified by:
toObservableState
in interfaceStateMachine.ObservableStateBuilder<S>
-