org.jscience.computing.ai.planning
Class LogicalPrecondition

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

public class LogicalPrecondition
extends CompileTimeObject

Each logical precondition at compile time is represented as an instance of this class.


Constructor Summary
LogicalPrecondition(LogicalExpression leIn, boolean firstIn)
          To initialize this logical precondition.
LogicalPrecondition(LogicalExpression leIn, java.lang.String funcIn)
          To initialize this logical precondition.
 
Method Summary
 boolean getFirst()
          To check whether or not this logical precondition is marked :first.
 java.lang.String getInitCode()
          This function produces Java code that implements the class any object of which can be used at run time to represent this logical precondition.
 void setVarCount(int varCount)
          This function is used to set the number of variables for this logical precondition.
 java.lang.String toCode()
          This function produces the Java code to create an object that represents this logical precondition at run time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalPrecondition

public LogicalPrecondition(LogicalExpression leIn,
                           boolean firstIn)
To initialize this logical precondition.

Parameters:
leIn - the logical expression this class represents.
firstIn - whether or not this logical precondition is marked :first.

LogicalPrecondition

public LogicalPrecondition(LogicalExpression leIn,
                           java.lang.String funcIn)
To initialize this logical precondition.

Parameters:
leIn - the logical expression this class represents.
funcIn - the name of the function used in a :sort-by logical precondition.
Method Detail

getFirst

public boolean getFirst()
To check whether or not this logical precondition is marked :first.

Returns:
true if this logical precondition is marked :first, false otherwise.

getInitCode

public java.lang.String getInitCode()
This function produces Java code that implements the class any object of which can be used at run time to represent this logical precondition.

Returns:
DOCUMENT ME!

setVarCount

public void setVarCount(int varCount)
This function is used to set the number of variables for this logical precondition.

Parameters:
varCount - the number of variables for this logical precondition.

toCode

public java.lang.String toCode()
This function produces the Java code to create an object that represents this logical precondition at run time.

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