org.jscience.computing.ai.planning
Class PreconditionAssign

java.lang.Object
  extended by org.jscience.computing.ai.planning.Precondition
      extended by org.jscience.computing.ai.planning.PreconditionAssign

public class PreconditionAssign
extends Precondition

This class represents an iterator over all the possible bindings that can satisfy an assignment logical expression at run time. Note that in this there is only one such binding.


Constructor Summary
PreconditionAssign(Term termIn, Term[] unifier, int whichVarIn)
          To initialize this assigment logical expression.
 
Method Summary
 void bind(Term[] binding)
          To bind the assignment logical expression to some binding.
protected  Term[] nextBindingHelper()
          To return the next satisfier for this assignment logical expression.
protected  void resetHelper()
          To reset this assignment logical expression.
 
Methods inherited from class org.jscience.computing.ai.planning.Precondition
nextBinding, reset, setComparator, setFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreconditionAssign

public PreconditionAssign(Term termIn,
                          Term[] unifier,
                          int whichVarIn)
To initialize this assigment logical expression.

Parameters:
termIn - the term this assigment logical expression represents.
unifier - the current unifier.
whichVarIn - the index of the variable to be given a value under this assignment logical expression.
Method Detail

bind

public void bind(Term[] binding)
To bind the assignment logical expression to some binding.

Specified by:
bind in class Precondition
Parameters:
binding - DOCUMENT ME!

nextBindingHelper

protected Term[] nextBindingHelper()
To return the next satisfier for this assignment logical expression.

Specified by:
nextBindingHelper in class Precondition
Returns:
DOCUMENT ME!

resetHelper

protected void resetHelper()
To reset this assignment logical expression.

Specified by:
resetHelper in class Precondition