org.jscience.computing.ai.planning
Class InternalElement

java.lang.Object
  extended by org.jscience.computing.ai.planning.CompileTimeObject
      extended by org.jscience.computing.ai.planning.InternalElement
Direct Known Subclasses:
InternalAxiom, InternalMethod, InternalOperator

public abstract class InternalElement
extends CompileTimeObject

Each domain element (i.e., method, operator, or axiom) at compile time is represented as an instance of a class derived from this abstract class.


Constructor Summary
InternalElement(Predicate headIn, int cntIn)
          To initialize this internal domain element.
 
Method Summary
 int getCnt()
          To get the number of objects already instantiated from this class before this object was instantiated.
 Predicate getHead()
          To get the head of this internal domain element.
 
Methods inherited from class org.jscience.computing.ai.planning.CompileTimeObject
toCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalElement

public InternalElement(Predicate headIn,
                       int cntIn)
To initialize this internal domain element.

Parameters:
headIn - head of this element.
cntIn - index of this element in the domain description.
Method Detail

getCnt

public int getCnt()
To get the number of objects already instantiated from this class before this object was instantiated. This is used as a unique identifier for this object to distinguish it from the other objects of this class.

Returns:
the number of objects already instantiated from this class before this object was instantiated.

getHead

public Predicate getHead()
To get the head of this internal domain element.

Returns:
the head of this internal domain element.