|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscanner.Transition
public class Transition
This class defines transitions between states that are used for defining finale state automatas. A transition can then be added to one and only one state.
| Constructor Summary | |
|---|---|
Transition(State state,
char character)
|
|
Transition(State state,
char[] characters)
Constructs a new transition. |
|
| Method Summary | |
|---|---|
void |
add(char[] characters)
Adds new characters to this transition to activate it. |
boolean |
contains(char character)
Returns true if the given character activate this transition. |
boolean |
contains(char[] characters)
Returns true if the given characters activate this transition. |
char[] |
getChars()
Returns characters that activate this transition. |
State |
getSourceState()
Returns the source state of this transition. |
State |
getTargetState()
Returns the target state of this transition. |
char[] |
intersect(char[] parameter)
Returns an array containing characters that are activating this transition and that are also contained in the given array. |
boolean |
isPossible(char character)
Checks if this transition would be activated with the given character. |
boolean |
isSelfTransition()
Returns true if this transition is a self transition. |
void |
setTargetState(State state)
Sets the target state of this transition. |
void |
substract(char[] characters)
Removes the given characters to the ones activating this transition. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Transition(State state,
char[] characters)
state - The new state reached if this transition is activated.characters - Characters that will activate this transition.
public Transition(State state,
char character)
| Method Detail |
|---|
public boolean isPossible(char character)
character - The character that may activate this transition.
public char[] getChars()
public State getTargetState()
public State getSourceState()
public void setTargetState(State state)
state - the target state of this transition.public boolean isSelfTransition()
public void add(char[] characters)
public char[] intersect(char[] parameter)
parameter - An array of char.
public boolean contains(char[] characters)
characters - An array of char.
public boolean contains(char character)
character - A character.
public void substract(char[] characters)
characters - Characters to be removed from the ones activating this
transition.public java.lang.String toString()
toString in class java.lang.Object
|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||