Class Keyboard

java.lang.Object
  |
  +--Keyboard

public class Keyboard
extends java.lang.Object


Constructor Summary
Keyboard()
           
 
Method Summary
static boolean endOfLine()
          Returns true if there are no more tokens to read on the current input line.
static int getErrorCount()
          Returns the current error count.
static boolean getPrintErrors()
          Returns a boolean indicating whether input errors are currently printed to standard output.
static boolean readBoolean()
          Returns a boolean read from standard input.
static char readChar()
          Returns a character read from standard input.
static double readDouble()
          Returns a double read from standard input.
static float readFloat()
          Returns a float read from standard input.
static int readInt()
          Returns an integer read from standard input.
static long readLong()
          Returns a long integer read from standard input.
static java.lang.String readString()
          Returns a string read from standard input.
static java.lang.String readWord()
          Returns a space-delimited substring (a word) read from standard input.
static void resetErrorCount(int count)
          Resets the current error count to zero.
static void setPrintErrors(boolean flag)
          Sets a boolean indicating whether input errors are to be printed to standard output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Keyboard

public Keyboard()
Method Detail

getErrorCount

public static int getErrorCount()
Returns the current error count.

resetErrorCount

public static void resetErrorCount(int count)
Resets the current error count to zero.

getPrintErrors

public static boolean getPrintErrors()
Returns a boolean indicating whether input errors are currently printed to standard output.

setPrintErrors

public static void setPrintErrors(boolean flag)
Sets a boolean indicating whether input errors are to be printed to standard output.

endOfLine

public static boolean endOfLine()
Returns true if there are no more tokens to read on the current input line.

readString

public static java.lang.String readString()
Returns a string read from standard input.

readWord

public static java.lang.String readWord()
Returns a space-delimited substring (a word) read from standard input.

readBoolean

public static boolean readBoolean()
Returns a boolean read from standard input.

readChar

public static char readChar()
Returns a character read from standard input.

readInt

public static int readInt()
Returns an integer read from standard input.

readLong

public static long readLong()
Returns a long integer read from standard input.

readFloat

public static float readFloat()
Returns a float read from standard input.

readDouble

public static double readDouble()
Returns a double read from standard input.