Search in sources :

Example 1 with NullOperator

use of nars.operator.NullOperator in project opennars by opennars.

the class Register method execute.

/**
 * To register a new operator
 * @param args Arguments, a Statement followed by an optional tense
 * @param memory The memory in which the operation is executed
 * @return Immediate results as Tasks
 */
@Override
protected ArrayList<Task> execute(Operation operation, Term[] args, Memory memory) {
    Operator op = new NullOperator(args[1].toString());
    // add error checking
    memory.addOperator(op);
    return null;
}
Also used : NullOperator(nars.operator.NullOperator) Operator(nars.operator.Operator) NullOperator(nars.operator.NullOperator)

Aggregations

NullOperator (nars.operator.NullOperator)1 Operator (nars.operator.Operator)1