public class Transition
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Transition(int i,
boolean label)
Take in input a transition
|
Transition(int initial,
int label,
int fina) |
Modifier and Type | Method and Description |
---|---|
int |
getFinal() |
int |
getInitial() |
int |
getLabel() |
static Transition[] |
getTransitionByLabel(int l,
Transition[] tr)
Return all the transitions with label l
|
static Transition[] |
getTransitionFrom(int n,
Transition[] tr)
Returns all the transitions starting from a state n
|
java.lang.String |
toString()
override of toString
|
public Transition(int initial, int label, int fina)
initial
- initial statelabel
- labelfina
- final statepublic Transition(int i, boolean label)
i
- the index of the transition to be showed as a message to the userlabel
- true if the label must be specified, otherwise falsepublic int getInitial()
public int getLabel()
public int getFinal()
public java.lang.String toString()
toString
in class java.lang.Object
public static Transition[] getTransitionFrom(int n, Transition[] tr)
n
- the initial statetr
- the array of transitionspublic static Transition[] getTransitionByLabel(int l, Transition[] tr)
l
- the labeltr
- an array of transitions