Package com.mckoi.util
Class ShellUserTerminal
java.lang.Object
com.mckoi.util.ShellUserTerminal
- All Implemented Interfaces:
UserTerminal
An implementation of UserTerminal that uses the shell terminal via
System.in and System.out.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAsks the user a question from the 'question' string.voidOutputs a string of information to the terminal.voidOutputs a string of information and a newline to the terminal.
-
Constructor Details
-
ShellUserTerminal
public ShellUserTerminal()
-
-
Method Details
-
print
Description copied from interface:UserTerminalOutputs a string of information to the terminal.- Specified by:
printin interfaceUserTerminal
-
println
Description copied from interface:UserTerminalOutputs a string of information and a newline to the terminal.- Specified by:
printlnin interfaceUserTerminal
-
ask
Description copied from interface:UserTerminalAsks the user a question from the 'question' string. The 'options' list is the list of options that the user may select from. The 'default_answer' is the option that is selected by default.- Specified by:
askin interfaceUserTerminal
-