com.develop.io
Class Console

java.lang.Object
  |
  +--com.develop.io.Console

public class Console
extends java.lang.Object

Simple wrapper class for console input/output


Field Summary
(package private) static java.io.BufferedReader input
          Wraps System.in for reading in a line at time
 
Constructor Summary
private Console()
          Prevents construction
 
Method Summary
static void acceptChoice(java.lang.String prompt, java.lang.String choice)
          Prints prompt and forces user to enter choice before continuing
static java.lang.String acceptChoice(java.lang.String prompt, java.lang.String[] choices)
          Prints prompt and forces user to enter one of choices before continuing
static java.lang.String prompt(java.lang.String prompt)
          Prints prompt and returns user's response
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

input

static java.io.BufferedReader input
Wraps System.in for reading in a line at time
Constructor Detail

Console

private Console()
Prevents construction
Method Detail

prompt

public static java.lang.String prompt(java.lang.String prompt)
Prints prompt and returns user's response

acceptChoice

public static void acceptChoice(java.lang.String prompt,
                                java.lang.String choice)
Prints prompt and forces user to enter choice before continuing

acceptChoice

public static java.lang.String acceptChoice(java.lang.String prompt,
                                            java.lang.String[] choices)
Prints prompt and forces user to enter one of choices before continuing


New Jawin designed by Vitally Shelest. This product includes software developed by the DevelopMentor OpenSource Project (http://www.develop.com/OpenSource).