alice.tuprolog
Class OperatorManager

java.lang.Object
  extended byalice.tuprolog.OperatorManager
All Implemented Interfaces:
java.io.Serializable

public class OperatorManager
extends java.lang.Object
implements java.io.Serializable

This class manages prolog operators

See Also:
Operator, Serialized Form

Field Summary
static int OP_HIGH
          highest operator priority
static int OP_LOW
          lowest operator priority
 
Constructor Summary
OperatorManager()
           
 
Method Summary
 LinkedList getOperators()
          Gets the list of the operators currently defined
 boolean opNew(java.lang.String name, java.lang.String type, int prio)
          Creates a new operator If the operator is already provided, it replaces it with the new one
 int opNext(int prio)
          Gets the priority nearest (lower) to the priority of a defined operator
 int opPrio(java.lang.String name, java.lang.String type)
          Gets the priority of an operator (OP_LOW if the operator is not defined)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_LOW

public static final int OP_LOW
lowest operator priority

See Also:
Constant Field Values

OP_HIGH

public static final int OP_HIGH
highest operator priority

See Also:
Constant Field Values
Constructor Detail

OperatorManager

public OperatorManager()
Method Detail

opNew

public boolean opNew(java.lang.String name,
                     java.lang.String type,
                     int prio)
Creates a new operator If the operator is already provided, it replaces it with the new one


opPrio

public int opPrio(java.lang.String name,
                  java.lang.String type)
Gets the priority of an operator (OP_LOW if the operator is not defined)


getOperators

public LinkedList getOperators()
Gets the list of the operators currently defined


opNext

public int opNext(int prio)
Gets the priority nearest (lower) to the priority of a defined operator



DEIS, Universita' di Bologna, Sede di Cesena