jfrace
Interface Terminal

All Known Implementing Classes:
SimpleTerminal, Console, ThomsonGDPTerminal

public interface Terminal

An interface for a terminal.

Author:
Franz-Josef Elmer

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 there is no character typed.
 char readChar()
          Return a typed character if available.
 void writeChar(char c)
          Write a character to the terminal.
 

Method Detail

getName

public java.lang.String getName()
Return the name of the terminal.

getDevice

public Device getDevice()
Return the device of the terminal. If no Device return null.

isEmpty

public boolean isEmpty()
Return true if there is no character typed.

readChar

public char readChar()
Return a typed character if available. Otherwise '\0' is returned. Note that an available character can be read only once.
See Also:
getNextChar

getNextChar

public char getNextChar()
Get the next character typed in. If no character is available the method is waiting until the user enters a character.
See Also:
readChar

writeChar

public void writeChar(char c)
Write a character to the terminal.