public class Automatic
extends java.lang.Object
Constructor and Description |
---|
Automatic()
Constructor without parameters.
|
Automatic(int numStates)
Constructor with number of states.
|
Modifier and Type | Method and Description |
---|---|
void |
addListStates(AutomaticState state)
addListStates: add a State to the list of States.
|
AutomaticState |
getCurrentState()
getCurrentState: return the current State.
|
java.util.ArrayList<AutomaticState> |
getListState()
getListState: return the list of States.
|
int |
getNumStates()
getNumStates: return the number of States.
|
AutomaticState |
getState(int pos)
getState: returns the state that is in the indicated position.
|
AutomaticState |
getState(java.lang.String name)
getState: Return the state whose name matches the past as parameter.
|
void |
setCurrentState(AutomaticState currentState)
setCurrentState: set the current State of the system.
|
void |
setListState(java.util.ArrayList<AutomaticState> listState)
setListState: set the list of States.
|
void |
setNumStates(int numStates)
setNumStates: set the number of States.
|
java.lang.String |
toString()
toString
|
void |
updateListStates(AutomaticState state,
int pos)
updateListStates: update a State to the list of States.
|
public Automatic()
public Automatic(int numStates)
numStates
- number of states that owns the system.public int getNumStates()
public void setNumStates(int numStates)
numStates
- number of states that owns the system.public java.util.ArrayList<AutomaticState> getListState()
public void setListState(java.util.ArrayList<AutomaticState> listState)
listState
- list of states to setpublic void addListStates(AutomaticState state)
state
- to add to the list of states.public void updateListStates(AutomaticState state, int pos)
state
- to add to the list of states.pos
- position to set the state.public AutomaticState getState(int pos)
pos:
- position to get the state.public AutomaticState getState(java.lang.String name)
name
- to search.public AutomaticState getCurrentState()
public void setCurrentState(AutomaticState currentState)
currentState
- State to set.public java.lang.String toString()
toString
in class java.lang.Object