org.jscience.computing.ai.planning
Class TaskAtom

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

public class TaskAtom
extends CompileTimeObject

Each task atom both at compile time and at run time is represented as an object of this class.


Constructor Summary
TaskAtom(Predicate headIn, boolean immediateIn, boolean primitiveIn)
          To initialize this task atom.
 
Method Summary
 TaskAtom bind(Term[] binding)
          To calculate the result of applying a given binding to this task atom.
 Predicate getHead()
          To get the head of this task atom.
 boolean isImmediate()
          To check if this task atom is marked :immediate.
 boolean isPrimitive()
          To check if this task atom is primitive.
 void print()
          This function is used to print this task atom.
 java.lang.String toCode()
          This function produces Java code to create this task atom.
 java.lang.String toString()
          This function is used to produce a printable String showing the value of this task atom.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskAtom

public TaskAtom(Predicate headIn,
                boolean immediateIn,
                boolean primitiveIn)
To initialize this task atom.

Parameters:
headIn - the task atom itself.
immediateIn - whether or not this task atom is marked :immediate.
primitiveIn - whether or not this task atom is a primitive one.
Method Detail

bind

public TaskAtom bind(Term[] binding)
To calculate the result of applying a given binding to this task atom.

Parameters:
binding - the binding to be applied.
Returns:
the result of the binding.

getHead

public Predicate getHead()
To get the head of this task atom.

Returns:
the head of this task atom.

isImmediate

public boolean isImmediate()
To check if this task atom is marked :immediate.

Returns:
true if the task atom is marked :immediate, false otherwise.

isPrimitive

public boolean isPrimitive()
To check if this task atom is primitive.

Returns:
true if the task atom is primitive, false otherwise.

print

public void print()
This function is used to print this task atom.


toCode

public java.lang.String toCode()
This function produces Java code to create this task atom.

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

toString

public java.lang.String toString()
This function is used to produce a printable String showing the value of this task atom.

Overrides:
toString in class java.lang.Object
Returns:
the printable String that shows the value of this task atom.