Package it.univr.wordautomata.model
Class Transition
java.lang.Object
it.univr.wordautomata.model.Transition
- All Implemented Interfaces:
Serializable,Comparable<Transition>
Represents a transition in a
WordAutomata.
It contains a label that identifies the transition.- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.SimpleStringPropertyReturns the label property of the transition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Transition other) Compares this transition to another transition based on their labels.getLabel()Returns the label of the transition.javafx.beans.property.SimpleStringPropertyReturns the label property of the transition.voidSets the label of the transition.toString()Returns a string representation of the transition.
-
Property Details
-
label
public javafx.beans.property.SimpleStringProperty labelPropertyReturns the label property of the transition.- See Also:
-
-
Constructor Details
-
Transition
Constructs a transition with the given label.- Parameters:
label- the label of the transition- Throws:
IllegalArgumentException- if the label is null or blank
-
-
Method Details
-
labelProperty
public javafx.beans.property.SimpleStringProperty labelProperty()Returns the label property of the transition.- Returns:
- the label property
- See Also:
-
getLabel
Returns the label of the transition.- Returns:
- the label
-
setLabel
Sets the label of the transition.- Parameters:
label- the new label
-
toString
Returns a string representation of the transition. -
compareTo
Compares this transition to another transition based on their labels.- Specified by:
compareToin interfaceComparable<Transition>- Parameters:
other- the other transition to compare to- Returns:
- a negative integer, zero, or a positive integer as this transition is less than, equal to, or greater than the other transition
-