org.jscience.computing.ai.planning
Class DelAddAtomic

java.lang.Object
  extended by org.jscience.computing.ai.planning.CompileTimeObject
      extended by org.jscience.computing.ai.planning.DelAddElement
          extended by org.jscience.computing.ai.planning.DelAddAtomic

public class DelAddAtomic
extends DelAddElement

Each atomic element in the delete/add list of an operator both at compile time and run time is represented as an instance of this class.


Constructor Summary
DelAddAtomic(Predicate atomIn)
          To initialize this atomic delete/add element.
 
Method Summary
 void add(State s, Term[] binding, java.util.Vector[] delAddList)
          To add this atomic delete/add element to the current state of the world.
 boolean del(State s, Term[] binding, java.util.Vector[] delAddList)
          To delete this atomic delete/add element from the current state of the world.
 void setVarCount(int varCount)
          To set the number of variables in this atomic delete/add element.
 java.lang.String toCode()
          This function produces Java code to create this atomic delete/add element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelAddAtomic

public DelAddAtomic(Predicate atomIn)
To initialize this atomic delete/add element.

Parameters:
atomIn - the atom to be deleted/added.
Method Detail

add

public void add(State s,
                Term[] binding,
                java.util.Vector[] delAddList)
To add this atomic delete/add element to the current state of the world.

Specified by:
add in class DelAddElement
Parameters:
s - DOCUMENT ME!
binding - DOCUMENT ME!
delAddList - DOCUMENT ME!

del

public boolean del(State s,
                   Term[] binding,
                   java.util.Vector[] delAddList)
To delete this atomic delete/add element from the current state of the world.

Specified by:
del in class DelAddElement
Parameters:
s - DOCUMENT ME!
binding - DOCUMENT ME!
delAddList - DOCUMENT ME!
Returns:
DOCUMENT ME!

setVarCount

public void setVarCount(int varCount)
To set the number of variables in this atomic delete/add element.

Specified by:
setVarCount in class DelAddElement
Parameters:
varCount - DOCUMENT ME!

toCode

public java.lang.String toCode()
This function produces Java code to create this atomic delete/add element.

Specified by:
toCode in class CompileTimeObject
Returns:
DOCUMENT ME!