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

com.cmt.statemachine.State Maven / Gradle / Ivy

The newest version!
package com.cmt.statemachine;

import com.cmt.statemachine.impl.TransitionType;

import java.util.Collection;
import java.util.List;

/**
 * State
 *
 * @param  the type of state
 * @param  the type of event
 *
 * @author Frank Zhang
 * @date 2020-02-07 2:12 PM
 */
public interface State extends Visitable{

    /**
     * Gets the state identifier.
     *
     * @return the state identifiers
     */
    S getId();

    /**
     * Add transition to the state
     * @param event the event of the Transition
     * @param target the target of the transition
     * @return
     */
    Transition addTransition(E event, State target, TransitionType transitionType);

    List> getTransition(E event);

    Collection> getTransitions();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy