public class FSMState extends Object
Modifier and Type | Field and Description |
---|---|
int |
id
Id of the state.
|
Set<FSMTransition> |
transitions
It specifies the list of transitions outgoing from this state.
|
Constructor and Description |
---|
FSMState()
It creates a state with id equl to the number of instances FSMState created.
|
FSMState(FSMState a)
It creates a state with an id as the id specified by a supplied state.
|
FSMState(HashSet<FSMTransition> transitions,
int id)
It constructs a FSM state.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransition(FSMTransition transition)
It adds transition to the list of transitions from
this state.
|
FSMState |
deepClone(Set<FSMState> states)
Performing deep clone unless this state has already a state with
the same id in the array of states.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public int id
public Set<FSMTransition> transitions
public FSMState(HashSet<FSMTransition> transitions, int id)
transitions
- it specifies transitionid
- state idpublic FSMState()
public FSMState(FSMState a)
a
- state from which id is taken while creating this state.public FSMState deepClone(Set<FSMState> states)
states
- it contains the states which do not need to be created, only reused.public void addTransition(FSMTransition transition)
transition
- the transition being added.Copyright © 2022. All rights reserved.