org.squirrelframework.foundation.fsm.StateMachineProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squirrel-foundation Show documentation
Show all versions of squirrel-foundation Show documentation
foundation module of squirrel framework which provided event driven infrastructure and a finite state machine implementation.
package org.squirrelframework.foundation.fsm;
import org.squirrelframework.foundation.component.SquirrelInstanceProvider;
@Deprecated
public class StateMachineProvider, S, E, C> implements SquirrelInstanceProvider {
private final StateMachineBuilder stateMachineBuilder;
private final S initialState;
private final Object[] extraParams;
public StateMachineProvider(
StateMachineBuilder stateMachineBuilder,
S initialState, Object[] extraParams) {
this.stateMachineBuilder = stateMachineBuilder;
this.initialState = initialState;
this.extraParams = extraParams;
}
public T get() {
return stateMachineBuilder.newStateMachine(initialState, extraParams);
}
}