|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.clients.console.Console
An easy interface to read numbers and strings from standard input
Constructor Summary | |
Console()
|
Method Summary | |
static void |
printPrompt(java.lang.String prompt)
print a prompt on the console but don't print a newline |
static float |
readFloat(java.lang.String prompt)
read a floating point number from the console. |
static int |
readInt(java.lang.String prompt)
read an integer from the console. |
static java.lang.String |
readLine()
read a string from the console. |
static java.lang.String |
readLine(java.lang.String prompt)
read a string from the console. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Console()
Method Detail |
public static void printPrompt(java.lang.String prompt)
prompt
- the prompt string to displaypublic static java.lang.String readLine()
public static java.lang.String readLine(java.lang.String prompt)
prompt
- the prompt string to display
public static int readInt(java.lang.String prompt)
prompt
- the prompt string to display
java.lang.NumberFormatException
- if bad inputpublic static float readFloat(java.lang.String prompt)
prompt
- the prompt string to display
java.lang.NumberFormatException
- if bad input
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |