osdep.console
Class ConsoleHelper

java.lang.Object
  extended by osdep.console.ConsoleHelper

public class ConsoleHelper
extends java.lang.Object

Common functions used to interact with the console

Author:
SHZ Mar 7, 2008

Constructor Summary
ConsoleHelper()
           
 
Method Summary
static java.lang.String request(java.lang.String question)
          Requests a text value from the user
static boolean requestYesNo(java.lang.String question)
          Requests a Yes/No answer from the user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleHelper

public ConsoleHelper()
Method Detail

request

public static java.lang.String request(java.lang.String question)
Requests a text value from the user

Parameters:
question - a textual question to ask to the user
Returns:
the answer to the question

requestYesNo

public static boolean requestYesNo(java.lang.String question)
Requests a Yes/No answer from the user.

Parameters:
question - the question to ask the user
Returns:
true if the user answered something that starts with 'y' or 'Y', false otherwise