// Path: state-machine-runtime/src/main/java/com/github/davidmoten/fsm/runtime/Event.java
// public interface Event<T> {
// }


import java.io.File;
import java.util.Optional;
import com.github.davidmoten.fsm.runtime.Event;
package com.github.davidmoten.fsm.model;



public final class State<T, R extends Event<? super T>> {

    private final String name;
    private final Class<R> eventClass;
    private final StateMachineDefinition<T> m;
    private boolean isCreationDestination;
    private Optional<String> documentation = Optional.empty();

    public State(StateMachineDefinition<T> m, String name, Class<R> eventClass) {
        this.m = m;
        this.name = name;
        this.eventClass = eventClass;
    }

    public Class<R> eventClass() {
        return eventClass;
    }

    public String name() {
        return name;
    }

    public Optional<String> documentation() {
        return documentation;
    }

    public StateMachineDefinition<?> stateMachine() {
        return m;
    }

// Path: state-machine-runtime/src/main/java/com/github/davidmoten/fsm/runtime/Event.java
// public interface Event<T> {
// }


// Path: state-machine-generator/src/main/java/com/github/davidmoten/fsm/model/State.java
import java.io.File;
import java.util.Optional;
import com.github.davidmoten.fsm.runtime.Event;

package com.github.davidmoten.fsm.model;



public final class State<T, R extends Event<? super T>> {

    private final String name;
    private final Class<R> eventClass;
    private final StateMachineDefinition<T> m;
    private boolean isCreationDestination;
    private Optional<String> documentation = Optional.empty();

    public State(StateMachineDefinition<T> m, String name, Class<R> eventClass) {
        this.m = m;
        this.name = name;
        this.eventClass = eventClass;
    }

    public Class<R> eventClass() {
        return eventClass;
    }

    public String name() {
        return name;
    }

    public Optional<String> documentation() {
        return documentation;
    }

    public StateMachineDefinition<?> stateMachine() {
        return m;
    }

    public <S extends Event<? super T>> State<T, S> to(State<T, S> other) {