Files
spring-soap/algorithms/src/main/java/com/baeldung/automata/State.java
Mihai Emil Andronache 202a19acbf Automata indentation and link (#1425)
* finite automata example

* indentation and link
2017-03-19 10:29:39 +01:00

30 lines
631 B
Java

package com.baeldung.automata;
/**
* State. Part of a finite state machine.
*/
public interface State {
/**
* Add a Transition to this state.
* @param tr Given transition.
* @return Modified State.
*/
State with(final Transition tr);
/**
* Follow one of the transitions, to get
* to the next state.
* @param c Character.
* @return State.
* @throws IllegalStateException if the char is not accepted.
*/
State transit(final CharSequence c);
/**
* Can the automaton stop on this state?
* @return true or false
*/
boolean isFinal();
}