JSHOP2
Class Method

java.lang.Object
  extended by JSHOP2.DomainElement
      extended by JSHOP2.Method

public abstract class Method
extends DomainElement

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

Version:
1.0.3
Author:
Okhtay Ilghami, http://www.cs.umd.edu/~okhtay

Field Summary
private  TaskList[] subs
          An array of task lists to any of which this method can decompse its associated task given that the corresponding precondition is satisfied.
 
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 JSHOP2.DomainElement
getHead, getIterator, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subs

private TaskList[] subs
An array of task lists to any of which this method can decompse its associated task given that the corresponding precondition is satisfied.

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.