Module net.automatalib.util
Class FSABuilder<S,I,A extends MutableFSA<S,? super I>>
- java.lang.Object
-
- net.automatalib.util.automaton.builder.FSABuilder<S,I,A>
-
- Type Parameters:
S- state typeI- input symbol typeA- concrete automaton type
public class FSABuilder<S,I,A extends MutableFSA<S,? super I>> extends Object
A fluent builder forFiniteStateAcceptors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFSABuilder.FSABuilder0A state (-class) of the enclosing fluent interface.classFSABuilder.FSABuilder1A state (-class) of the enclosing fluent interface.classFSABuilder.FSABuilder2A state (-class) of the enclosing fluent interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acreate()Returns the constructed automaton.FSABuilder.FSABuilder0from(Object stateId)Starts a definition of transition(s) from a given source state.FSABuilder.FSABuilder0from(Object firstStateId, Object... otherStateIds)Starts a definition of transition(s) from multiple given source states.FSABuilder<S,I,A>withAccepting(Object stateId)Marks the given state as accepting.FSABuilder<S,I,A>withAccepting(Object stateId, Object... stateIds)Marks the given states as accepting.FSABuilder<S,I,A>withInitial(Object stateId)Marks the given state as initial.FSABuilder<S,I,A>withInitial(Object stateId, Object... stateIds)Marks the given states as initial.
-
-
-
Method Detail
-
withAccepting
public FSABuilder<S,I,A> withAccepting(Object stateId)
Marks the given state as accepting.- Parameters:
stateId- the object to identify the state- Returns:
- the next fluent state
-
withAccepting
public FSABuilder<S,I,A> withAccepting(Object stateId, Object... stateIds)
Marks the given states as accepting.- Parameters:
stateId- the object to identify the mandatory statestateIds- the objects to identify the additional states- Returns:
- the next fluent state
-
create
public A create()
Returns the constructed automaton.- Returns:
- the automaton
-
withInitial
public FSABuilder<S,I,A> withInitial(Object stateId)
Marks the given state as initial.- Parameters:
stateId- the object to identify the state- Returns:
- the next fluent state
-
withInitial
public FSABuilder<S,I,A> withInitial(Object stateId, Object... stateIds)
Marks the given states as initial.- Parameters:
stateId- the object to identify the mandatory statestateIds- the objects to identify the additional states- Returns:
- the next fluent state
-
from
public FSABuilder.FSABuilder0 from(Object stateId)
Starts a definition of transition(s) from a given source state.- Parameters:
stateId- the object to identify the state- Returns:
- the next fluent state
-
from
public FSABuilder.FSABuilder0 from(Object firstStateId, Object... otherStateIds)
Starts a definition of transition(s) from multiple given source states.- Parameters:
firstStateId- the mandatory object to identify the first stateotherStateIds- the optional objects to identify additional states- Returns:
- the next fluent state
-
-