/** * Create a new {@link StateMachine} instance with the specified initial * state. This method returns a reference to the {@link StateMachineBuilder} * which allows for adding of transitions to the state machine. * @param initialState The start state of the state machine. * @param <T> The trigger type. * @param <C> The context type. * @return A reference to the {@link StateMachineBuilder} which is used for * creating the {@link StateMachine}. */ @CheckReturnValue public static <T, C> StateMachineBuilder<T, C> create( State<T, C> initialState) { return new StateMachineBuilder<>(initialState); }
/** * Create a new {@link StateMachine} instance with the specified initial * state. This method returns a reference to the {@link StateMachineBuilder} * which allows for adding of transitions to the state machine. * @param initialState The start state of the state machine. * @param <T> The trigger type. * @param <C> The context type. * @return A reference to the {@link StateMachineBuilder} which is used for * creating the {@link StateMachine}. */ @CheckReturnValue public static <T, C> StateMachineBuilder<T, C> create( State<T, C> initialState) { return new StateMachineBuilder<>(initialState); }