Class State
- java.lang.Object
-
- it.unive.lisa.util.datastructures.automaton.State
-
-
Constructor Summary
Constructors Constructor Description State(int id, boolean isInitial, boolean isFinal)
State constructor, it creates a new state with the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(State state)
boolean
equals(java.lang.Object obj)
int
getId()
Returns the states, id.java.lang.String
getState()
Yields a textual representation of this state.int
hashCode()
boolean
isFinal()
Tells if the state is either final or not.boolean
isInitial()
Tells if the state is either initial or not.java.lang.String
toString()
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isFinal
public boolean isFinal()
Tells if the state is either final or not.- Returns:
- boolean value that indicates if it is a final state.
-
isInitial
public boolean isInitial()
Tells if the state is either initial or not.- Returns:
- boolean value that indicates if it is an initial state
-
getId
public int getId()
Returns the states, id.- Returns:
- integer value representing the state's id.
-
compareTo
public int compareTo(State state)
- Specified by:
compareTo
in interfacejava.lang.Comparable<State>
-
getState
public java.lang.String getState()
Yields a textual representation of this state.- Returns:
- the textual representation
-
-