|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
CommandUI
public abstract class CommandUI
an extensible, dynamic command line interface.
when extending, provide functions with signature:
x y _z(String ... args);
OR
x y _z(String arg);
where
x = any accessibility modifier (private recommended)
y = any return type (void recommended, nothing will be returned regardless)
z = function name to call on the command line
| Nested Class Summary | |
|---|---|
protected static class |
CommandUI.InternalException
thrown for internal, non-breaking errors |
| Constructor Summary | |
|---|---|
CommandUI()
default constructor PROMPT is initialized to "%" |
|
CommandUI(java.lang.String prompt)
|
|
CommandUI(java.lang.String prompt,
java.lang.String function)
|
|
| Method Summary | |
|---|---|
void |
quit()
halts execution before next input |
void |
run()
primary execution method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandUI()
public CommandUI(java.lang.String prompt)
prompt - input promptpublic CommandUI(java.lang.String prompt,
java.lang.String function)
prompt - input promptfunction - default function to invoke| Method Detail |
|---|
public void quit()
public void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||