All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.squirrelframework.foundation.fsm.StateMachineProvider Maven / Gradle / Ivy

Go to download

foundation module of squirrel framework which provided event driven infrastructure and a finite state machine implementation.

There is a newer version: 0.3.10
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy