public class Agent
extends java.lang.Object
Prolog
Constructor and Description |
---|
Agent(java.io.InputStream is)
Constructs the Agent with a theory provided
by an input stream
|
Agent(java.io.InputStream is,
java.lang.String goal)
Constructs the Agent with a theory provided
by an input stream and a goal
|
Agent(java.lang.String theory)
Builds a prolog agent providing it a theory
|
Agent(java.lang.String theory,
java.lang.String goal)
Builds a prolog agent providing it a theory and a goal
|
Modifier and Type | Method and Description |
---|---|
void |
addOutputListener(OutputListener l)
Adds a listener to ouput events
|
static void |
main(java.lang.String[] args) |
void |
removeAllOutputListener()
Removes all output event listeners
|
void |
removeOutputListener(OutputListener l)
Removes a listener to ouput events
|
void |
spawn()
Starts agent execution
|
public Agent(java.lang.String theory)
theory
- the text representing the theorypublic Agent(java.lang.String theory, java.lang.String goal)
public Agent(java.io.InputStream is)
public Agent(java.io.InputStream is, java.lang.String goal)
public final void spawn()
public void addOutputListener(OutputListener l)
l
- the listenerpublic void removeOutputListener(OutputListener l)
l
- the listenerpublic void removeAllOutputListener()
public static void main(java.lang.String[] args)