cli
Class ReadKb

java.lang.Object
  extended by cli.ReadKb

public class ReadKb
extends java.lang.Object

Another collection of methods for getting keyboard input from The Java Way text


Field Summary
(package private) static java.util.Scanner scanner
           
 
Constructor Summary
ReadKb()
           
 
Method Summary
static double getDouble()
          Reads a Double from the keyboard
static double getDouble(java.lang.String prompt_)
          Reads a Double from the keyboard with prompt
static double getDouble(java.lang.String prompt_, double min_, double max_)
          Reads a Double from the keyboard with prompt in range min-max inclusive
static int getInt()
          Reads an Integer from the keyboard
static int getInt(java.lang.String prompt_)
          Reads a Integer from the keyboard with prompt
static int getInt(java.lang.String prompt_, int min_, int max_)
          Reads a Integer from the keyboard with prompt in range min-max inclusive
static java.lang.String getString()
          Reads a String from the keyboard
static java.lang.String getString(java.lang.String prompt_)
          Reads a String from the keyboard with prompt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scanner

static java.util.Scanner scanner
Constructor Detail

ReadKb

public ReadKb()
Method Detail

getDouble

public static double getDouble()
Reads a Double from the keyboard

Returns:

getDouble

public static double getDouble(java.lang.String prompt_)
Reads a Double from the keyboard with prompt

Parameters:
prompt_ -
Returns:

getDouble

public static double getDouble(java.lang.String prompt_,
                               double min_,
                               double max_)
Reads a Double from the keyboard with prompt in range min-max inclusive

Parameters:
prompt_ -
min_ -
max_ -
Returns:

getInt

public static int getInt()
Reads an Integer from the keyboard

Returns:

getInt

public static int getInt(java.lang.String prompt_)
Reads a Integer from the keyboard with prompt

Parameters:
prompt_ -
Returns:

getInt

public static int getInt(java.lang.String prompt_,
                         int min_,
                         int max_)
Reads a Integer from the keyboard with prompt in range min-max inclusive

Parameters:
prompt_ -
max_ -
min_ -
Returns:

getString

public static java.lang.String getString()
Reads a String from the keyboard

Returns:

getString

public static java.lang.String getString(java.lang.String prompt_)
Reads a String from the keyboard with prompt

Parameters:
prompt_ -
Returns: