Top Inners Constructors Methods
org.reactfx

public Class StateMachine

Additional top-level classes in compilation unit: InitialStateImpl, ObservableStateBuilderImpl, StateStream, StatefulStreamBuilderImpl, StatefulStream, ObservableStateBuilderOnImpl, StatefulStreamBuilderOnImpl, InputHandler, InputHandlerBuilder, TransitionBuilder, EmissionBuilder, TransmissionBuilder.

extends Object
Class Inheritance
Static Imports
org.reactfx.util.LL.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static interface
public static interface
public static interface
public static interface

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <S> StateMachine.InitialState<S>
init(S initialState)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StateMachineback to summary
public StateMachine()

Method Detail

initback to summary
public static <S> StateMachine.InitialState<S> init(S initialState)
org.reactfx back to summary

public Interface StateMachine.InitialState<S>

Known Direct Implementers
org.reactfx.InitialStateImpl

Method Summary

Modifier and TypeMethod and Description
public <I> StateMachine.ObservableStateBuilderOn<S, I>
on(EventStream<I> input)

Method Detail

onback to summary
public <I> StateMachine.ObservableStateBuilderOn<S, I> on(EventStream<I> input)
org.reactfx back to summary

public Interface StateMachine.ObservableStateBuilder<S>

Known Direct Implementers
org.reactfx.ObservableStateBuilderImpl

Method Summary

Modifier and TypeMethod and Description
public <I> StateMachine.ObservableStateBuilderOn<S, I>
on(EventStream<I> input)

public Binding<S>
toObservableState()

Returns a binding that reflects the current state of the state machine.

public EventStream<S>
toStateStream()

Returns an event stream that emits the current state of the state machine every time it changes.

Method Detail

onback to summary
public <I> StateMachine.ObservableStateBuilderOn<S, I> on(EventStream<I> input)
toObservableStateback to summary
public Binding<S> toObservableState()

Returns a binding that reflects the current state of the state machine. Disposing the returned binding (by calling its dispose() method) causes the state machine to unsubscribe from the event streams that alter its state and allows the state machine to be garbage collected.

toStateStreamback to summary
public EventStream<S> toStateStream()

Returns an event stream that emits the current state of the state machine every time it changes.

org.reactfx back to summary

public Interface StateMachine.ObservableStateBuilderOn<S, I>

Known Direct Implementers
org.reactfx.ObservableStateBuilderOnImpl

Method Summary

Modifier and TypeMethod and Description
public <O> StateMachine.StatefulStreamBuilder<S, O>
emit(BiFunction<? super S, ? super I, Optional<O>> f)

public StateMachine.ObservableStateBuilder<S>
transition(BiFunction<? super S, ? super I, ? extends S> f)

public <O> StateMachine.StatefulStreamBuilder<S, O>
transmit(BiFunction<? super S, ? super I, Tuple2<S, Optional<O>>> f)

Method Detail

emitback to summary
public <O> StateMachine.StatefulStreamBuilder<S, O> emit(BiFunction<? super S, ? super I, Optional<O>> f)
transitionback to summary
public StateMachine.ObservableStateBuilder<S> transition(BiFunction<? super S, ? super I, ? extends S> f)
transmitback to summary
public <O> StateMachine.StatefulStreamBuilder<S, O> transmit(BiFunction<? super S, ? super I, Tuple2<S, Optional<O>>> f)
org.reactfx back to summary

public Interface StateMachine.StatefulStreamBuilder<S, O>

Known Direct Implementers
org.reactfx.StatefulStreamBuilderImpl

Method Summary

Modifier and TypeMethod and Description
public <I> StateMachine.StatefulStreamBuilderOn<S, O, I>
on(EventStream<I> input)

public EventStream<O>
toEventStream()

Returns an event stream that emits a value when one of the state machine's input streams causes the state machine to emit a value.

Method Detail

onback to summary
public <I> StateMachine.StatefulStreamBuilderOn<S, O, I> on(EventStream<I> input)
toEventStreamback to summary
public EventStream<O> toEventStream()

Returns an event stream that emits a value when one of the state machine's input streams causes the state machine to emit a value.

The returned event stream is lazily bound, meaning the associated state machine is subscribed to its inputs only when the returned stream has at least one subscriber. No state transitions take place unless there is a subscriber to the returned stream. If you need to keep the state machine alive even when temporarily not subscribed to the returned stream, you can pin the returned stream.

org.reactfx back to summary

public Interface StateMachine.StatefulStreamBuilderOn<S, O, I>

Known Direct Implementers
org.reactfx.StatefulStreamBuilderOnImpl

Method Summary

Modifier and TypeMethod and Description
public StateMachine.StatefulStreamBuilder<S, O>
emit(BiFunction<? super S, ? super I, Optional<O>> f)

public StateMachine.StatefulStreamBuilder<S, O>
transition(BiFunction<? super S, ? super I, ? extends S> f)

public StateMachine.StatefulStreamBuilder<S, O>
transmit(BiFunction<? super S, ? super I, Tuple2<S, Optional<O>>> f)

Method Detail

emitback to summary
public StateMachine.StatefulStreamBuilder<S, O> emit(BiFunction<? super S, ? super I, Optional<O>> f)
transitionback to summary
public StateMachine.StatefulStreamBuilder<S, O> transition(BiFunction<? super S, ? super I, ? extends S> f)
transmitback to summary
public StateMachine.StatefulStreamBuilder<S, O> transmit(BiFunction<? super S, ? super I, Tuple2<S, Optional<O>>> f)