|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnars.language.Term
nars.operation.Operator
public abstract class Operator
An individual operator that can be execute by the system, though implemented outside NARS.
This is the only file to modify when adding a new operator into NARS.
| Field Summary |
|---|
| Fields inherited from class nars.language.Term |
|---|
name |
| Constructor Summary | |
|---|---|
Operator(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
call(Task task)
Execute an operation, then handle feedback |
abstract java.util.ArrayList<Task> |
execute(Task task)
Required method for every operation, specifying the operation |
static java.util.HashMap<java.lang.String,Operator> |
setOperators()
Register all built-in operators in the Memory |
private void |
showExecution(Statement operation)
Display a message in the output stream to indicate the execution of an operation |
| Methods inherited from class nars.language.Term |
|---|
clone, compareTo, equals, getComplexity, getConstantName, getName, getOrder, hashCode, isConstant, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Operator(java.lang.String name)
| Method Detail |
|---|
public abstract java.util.ArrayList<Task> execute(Task task)
task - The task with the arguments to be passed to the operator
public void call(Task task)
task - The task to be executedpublic static java.util.HashMap<java.lang.String,Operator> setOperators()
The only method to modify when adding a new operator into NARS. An operator name should contain at least two characters after '^'.
private void showExecution(Statement operation)
operation - The content of the operation to be executed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||