Module net.automatalib.util
Class MooreBuilder<S,I,T,O,A extends MutableMooreMachine<S,? super I,T,? super O>>
- java.lang.Object
-
- net.automatalib.util.automaton.builder.MooreBuilder<S,I,T,O,A>
-
- Type Parameters:
S- state typeI- input symbol typeT- transition typeO- output symbol typeA- concrete automaton type
public class MooreBuilder<S,I,T,O,A extends MutableMooreMachine<S,? super I,T,? super O>> extends Object
A fluent builder forMooreMachines.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMooreBuilder.MooreBuilder0A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder1A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder2A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder3A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder4A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder5A state (-class) of the enclosing fluent interface.classMooreBuilder.MooreBuilder6A state (-class) of the enclosing fluent interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MooreBuilder.MooreBuilder1from(Object stateId)Starts a definition of transition(s) from a given source state.MooreBuilder.MooreBuilder1from(Object firstStateId, Object... otherStateIds)Starts a definition of transition(s) from multiple given source states.MooreBuilder.MooreBuilder0withInitial(Object stateId)Marks the given state as initial.MooreBuilder.MooreBuilder0withInitial(Object stateId, O output)Marks the given state as initial and allows to set its output.MooreBuilder<S,I,T,O,A>withOutput(Object stateId, O output)Associates with the given state the given output symbol.
-
-
-
Method Detail
-
withInitial
public MooreBuilder.MooreBuilder0 withInitial(Object stateId)
Marks the given state as initial.- Parameters:
stateId- the object to identify the state- Returns:
- the next fluent state
-
withInitial
public MooreBuilder.MooreBuilder0 withInitial(Object stateId, O output)
Marks the given state as initial and allows to set its output.- Parameters:
stateId- the object to identify the stateoutput- the output of the state- Returns:
- the next fluent state
-
from
public MooreBuilder.MooreBuilder1 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 MooreBuilder.MooreBuilder1 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
-
-