Class JunoTerminal

java.lang.Object
  extended byJunoTerminal
All Implemented Interfaces:
InputInterface, OutputInterface

public class JunoTerminal
extends Object
implements InputInterface, OutputInterface

A Command line interface terminal for Juno.

Version:
10

Constructor Summary
JunoTerminal(boolean echo)
          Construct a JunoTerminal Allows for input echo, when, for example, input is redirected from a file.
 
Method Summary
 void errPrintln(String str)
          Write a String followed by a newline to console error output location.
 boolean isEchoInput()
          Query what kind of console this is.
 boolean isGUI()
          Query what kind of console this is.
 boolean isRemote()
          Query what kind of console this is.
 void println(String str)
          Write a String followed by a newline to console output location.
 String readLine(String promptString)
          Read a line (terminated by a newline).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JunoTerminal

public JunoTerminal(boolean echo)
Construct a JunoTerminal Allows for input echo, when, for example, input is redirected from a file.

Parameters:
echo - whether or not input should be echoed.
Method Detail

errPrintln

public void errPrintln(String str)
Write a String followed by a newline to console error output location.

Specified by:
errPrintln in interface OutputInterface
Parameters:
str - - the String to write

isEchoInput

public boolean isEchoInput()
Query what kind of console this is.

Specified by:
isEchoInput in interface OutputInterface
Returns:
true if and only if echoing input.

isGUI

public boolean isGUI()
Query what kind of console this is.

Specified by:
isGUI in interface OutputInterface
Returns:
false, since it is not a GUI

isRemote

public boolean isRemote()
Query what kind of console this is.

Specified by:
isRemote in interface OutputInterface
Returns:
false, since it is not remote.

println

public void println(String str)
Write a String followed by a newline to console output location.

Specified by:
println in interface OutputInterface
Parameters:
str - - the string to write

readLine

public String readLine(String promptString)
Read a line (terminated by a newline).

Specified by:
readLine in interface InputInterface
Parameters:
promptString - output string to prompt for input
Returns:
the string (without the newline character)