public interface AgentUI extends Observer
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_ANY |
static int |
TYPE_BOOLEAN |
static int |
TYPE_FLOAT |
static int |
TYPE_INT |
static int |
TYPE_STRING |
Modifier and Type | Method and Description |
---|---|
String |
ask(String prompt,
String help,
int type,
String _default)
The general contract is that the UI will return a string from the user
after prompting the use, that conforms to the the type specified by the
type parameter.
|
OutputStream |
getOutStream()
Returns an output stream that can be used to write to the interface
|
void |
print(String txt) |
void |
println(String txt) |
void |
start()
Lets the UI know that it should "start" displaying itself.
|
boolean |
takesHTML() |
static final int TYPE_STRING
static final int TYPE_ANY
static final int TYPE_INT
static final int TYPE_FLOAT
static final int TYPE_BOOLEAN
void print(String txt)
void println(String txt)
String ask(String prompt, String help, int type, String _default)
prompt
- The prompt the use will seehelp
- An extended prompt if the user enters something inappropriatetype
- The type which may be
Integer.parseInt(String)
Float.parseFloat(String)
_default
- The value to return (unchecked) if the user just hits [return]void start()
OutputStream getOutStream()
boolean takesHTML()