|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object finiteAutomata.NFAMenu
public class NFAMenu
Menu and query methods for the NFA class.
Constructor Summary | |
---|---|
NFAMenu()
|
Method Summary | |
---|---|
protected static void |
addEpsilonDialog(NFA nfa)
Queries user regarding which epsilon transition to add. |
protected static void |
addTransitionDialog(NFA nfa)
Queries user regarding which symbol-consuming transition to add. |
protected static void |
changeTransition(NFA nfa,
int n)
Takes action based on provided transition change choice code. |
protected static int |
changeTransitionDialog()
Queries user regarding desired transition change. |
protected static int |
constructorMenu()
Displays constructor menu options and prompts user to choose an action. |
protected static boolean |
constructorMenuHandler(NFA nfa,
int choice)
Takes action based on the provided constructor menu choice code. |
static void |
main(java.lang.String[] args)
|
protected static void |
queryAlphabet(NFA nfa)
Queries user to obtain alphabet of input symbols. |
protected static void |
queryFinal(NFA nfa)
Queries user to determine which states are final. |
protected static int |
queryNumStates()
Prints constructor menu heading, and queries user until valid (positive) number of states is obtained. |
protected static boolean |
queryPredefined()
Asks user if they want to use a pre-defined NFA. |
protected static void |
removeEpsilonDialog(NFA nfa)
Queries user regarding which epsilon transition to remove. |
protected static void |
removeTransitionDialog(NFA nfa)
Queries user regarding which symbol-consuming transition to remove. |
protected static int |
runMenu()
Displays run menu options and prompts user to make a choice of action. |
protected static boolean |
runMenuHandler(NFA nfa,
int choice)
Takes action based on the provided run menu choice code. |
protected static void |
testingDialog(NFA nfa)
Allows the user to repeatedly test strings on an NFA. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NFAMenu()
Method Detail |
---|
protected static boolean queryPredefined()
protected static int queryNumStates()
protected static void queryAlphabet(NFA nfa)
nfa
- the NFA being operated onprotected static void queryFinal(NFA nfa)
nfa
- the NFA being operated onprotected static int constructorMenu()
protected static boolean constructorMenuHandler(NFA nfa, int choice)
nfa
- the NFA being operated onchoice
- constructor menu choice code
protected static int runMenu()
protected static boolean runMenuHandler(NFA nfa, int choice)
nfa
- the NFA being operated onchoice
- run menu choice code
protected static int changeTransitionDialog()
protected static void changeTransition(NFA nfa, int n)
nfa
- the NFA being operated onn
- transition change choice codeprotected static void removeEpsilonDialog(NFA nfa)
nfa
- the NFA being operated onprotected static void removeTransitionDialog(NFA nfa)
nfa
- the NFA being operated onprotected static void addEpsilonDialog(NFA nfa)
nfa
- the NFA being operated onprotected static void addTransitionDialog(NFA nfa)
nfa
- the NFA being operated onprotected static void testingDialog(NFA nfa)
nfa
- the NFA being operated onpublic static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |