Class State<T>
- java.lang.Object
-
- io.github.contractautomata.catlib.automaton.state.AbstractState<List<BasicState<T>>>
-
- io.github.contractautomata.catlib.automaton.state.State<T>
-
- Type Parameters:
T
- generic type of the content the basic states
- All Implemented Interfaces:
Ranked
public class State<T> extends AbstractState<List<BasicState<T>>>
Class implementing a state of an Automaton.
A state is a tuple (list) of basic states of principals.
A state has a rank. Rank 1 is for an ensemble containing a single principal.
A rank greater than one is for an ensemble of states of principals.- Author:
- Davide Basile
-
-
Constructor Summary
Constructors Constructor Description State(List<BasicState<T>> listState)
Constructor for a State
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getRank()
Method inherited from the interface Ranked.List<BasicState<T>>
getState()
Getter of the content of this stateboolean
isFinalState()
Returns true if the state is finalboolean
isInitial()
Returns true if the state is initialString
toString()
Print a String representing this object
-
-
-
Constructor Detail
-
State
public State(List<BasicState<T>> listState)
Constructor for a State- Parameters:
listState
- the list of basic states
-
-
Method Detail
-
getRank
public Integer getRank()
Method inherited from the interface Ranked. It returns the rank of the state.- Returns:
- the rank of the state
-
isInitial
public boolean isInitial()
Returns true if the state is initial- Specified by:
isInitial
in classAbstractState<List<BasicState<T>>>
- Returns:
- true if the state is initial
-
isFinalState
public boolean isFinalState()
Returns true if the state is final- Specified by:
isFinalState
in classAbstractState<List<BasicState<T>>>
- Returns:
- true if the state is final
-
getState
public List<BasicState<T>> getState()
Getter of the content of this state- Overrides:
getState
in classAbstractState<List<BasicState<T>>>
- Returns:
- the list of basic states
-
-