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 intcompareTo(State state)booleanequals(java.lang.Object obj)intgetId()Returns the states, id.java.lang.StringgetState()Yields a textual representation of this state.inthashCode()booleanisFinal()Tells if the state is either final or not.booleanisInitial()Tells if the state is either initial or not.java.lang.StringtoString()
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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:
compareToin interfacejava.lang.Comparable<State>
-
getState
public java.lang.String getState()
Yields a textual representation of this state.- Returns:
- the textual representation
-
-