org.jscience.computing.ai.planning
Class Method

java.lang.Object
  extended by org.jscience.computing.ai.planning.DomainElement
      extended by org.jscience.computing.ai.planning.Method

public abstract class Method
extends DomainElement

Each method at run time is represented as a class derived from this abstract class.


Constructor Summary
Method(Predicate head)
          To initialize the method.
 
Method Summary
abstract  java.lang.String getLabel(int which)
          To get the label of a given branch of this method.
 TaskList[] getSubs()
          To get the possible decompositions of this method.
 void setSubs(TaskList[] subsIn)
          To set the possible decompositions of this method.
 
Methods inherited from class org.jscience.computing.ai.planning.DomainElement
getHead, getIterator, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Method

public Method(Predicate head)
To initialize the method.

Parameters:
head - head of the method.
Method Detail

getLabel

public abstract java.lang.String getLabel(int which)
To get the label of a given branch of this method.

Parameters:
which - the branch the label of which is to be returned.
Returns:
the label for that branch.

getSubs

public TaskList[] getSubs()
To get the possible decompositions of this method.

Returns:
an array of possible decompositions.

setSubs

public void setSubs(TaskList[] subsIn)
To set the possible decompositions of this method.

Parameters:
subsIn - an array of possible decompositions.