public class Console
extends java.lang.Object
Constructor and Description |
---|
Console()
Create a console which appends each evaluation output in a history list.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultSystemRulesFilename()
Get the default rules textfile name, which should be loaded at startup.
|
java.io.File |
getFile() |
java.lang.String |
interpreter(java.lang.String inputExpression)
Evaluates the given string-expression and returns the result in
OutputForm |
static void |
main(java.lang.String[] args) |
void |
printPrompt(java.io.PrintStream out,
java.lang.String prompt)
prints a prompt on the console but doesn't print a newline
|
java.lang.String |
readString(java.io.PrintStream out)
read a string from the console.
|
java.lang.String |
readString(java.io.PrintStream out,
java.lang.String prompt)
read a string from the console.
|
void |
setFile(java.io.File file) |
public Console()
public static void main(java.lang.String[] args)
public java.lang.String interpreter(java.lang.String inputExpression)
OutputForm
inputExpression
- public void printPrompt(java.io.PrintStream out, java.lang.String prompt)
out
- prompt
- the prompt string to displaypublic java.lang.String readString(java.io.PrintStream out)
out
- Description of Parameterpublic java.lang.String readString(java.io.PrintStream out, java.lang.String prompt)
prompt
- the prompt string to displayout
- Description of Parameterpublic void setFile(java.io.File file)
file
- public java.io.File getFile()
null
public java.lang.String getDefaultSystemRulesFilename()