jfrace.terminal
Class Console

java.lang.Object
  |
  +--jfrace.terminal.Console
All Implemented Interfaces:
java.lang.Runnable, Terminal

public class Console
extends java.lang.Object
implements java.lang.Runnable, Terminal

Implementation of the console as a terminal.

Author:
Franz-Josef Elmer

Constructor Summary
Console()
           
 
Method Summary
 Device getDevice()
          Return the device of the terminal.
 java.lang.String getName()
          Return the name of the terminal.
 char getNextChar()
          Get the next character typed in.
 boolean isEmpty()
          Return true if the type-ahead buffer is empty.
static void main(java.lang.String[] args)
           
 char readChar()
          Return a character from the type-ahead buffer.
 void run()
           
 void writeChar(char c)
          Send a character to the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

getName

public java.lang.String getName()
Return the name of the terminal.
Specified by:
getName in interface Terminal

getDevice

public Device getDevice()
Return the device of the terminal.
Specified by:
getDevice in interface Terminal

isEmpty

public boolean isEmpty()
Return true if the type-ahead buffer is empty.
Specified by:
isEmpty in interface Terminal

readChar

public char readChar()
Return a character from the type-ahead buffer. Return '\0' if the buffer is empty.
Specified by:
readChar in interface Terminal
Following copied from interface: jfrace.Terminal
See Also:
getNextChar

getNextChar

public char getNextChar()
Get the next character typed in.
Specified by:
getNextChar in interface Terminal
Following copied from interface: jfrace.Terminal
See Also:
readChar

writeChar

public void writeChar(char c)
Send a character to the screen.
Specified by:
writeChar in interface Terminal

main

public static void main(java.lang.String[] args)