JSHOP2
Class InternalMethod

java.lang.Object
  extended by JSHOP2.CompileTimeObject
      extended by JSHOP2.InternalElement
          extended by JSHOP2.InternalMethod

public class InternalMethod
extends InternalElement

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

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

Field Summary
private static int classCnt
          The number of objects already instantiated from this class.
private  java.util.Vector<java.lang.String> labels
          A Vector of Strings each of which represents the label of a branch of this method.
private  java.util.Vector<LogicalPrecondition> pres
          A Vector of logical preconditions each of which represents the precondition of a branch of this method.
private  java.util.Vector<TaskList> subs
          A Vector of task lists each of which represents a possible way to decompose the task associated with this method if the corresponding precondition is satisfied in the current state of the world.
 
Fields inherited from class JSHOP2.CompileTimeObject
endl
 
Constructor Summary
InternalMethod(Predicate head, java.util.Vector<java.lang.String> labelsIn, java.util.Vector<LogicalPrecondition> presIn, java.util.Vector<TaskList> subsIn)
          To initialize an InternalMethod object.
 
Method Summary
 java.lang.String toCode()
          This function produces the Java code needed to implement this method.
 
Methods inherited from class JSHOP2.InternalElement
getCnt, getHead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classCnt

private static int classCnt
The number of objects already instantiated from this class.


labels

private java.util.Vector<java.lang.String> labels
A Vector of Strings each of which represents the label of a branch of this method.


pres

private java.util.Vector<LogicalPrecondition> pres
A Vector of logical preconditions each of which represents the precondition of a branch of this method. Each branch is an alternative on how to decompose the task associated with this method.


subs

private java.util.Vector<TaskList> subs
A Vector of task lists each of which represents a possible way to decompose the task associated with this method if the corresponding precondition is satisfied in the current state of the world.

Constructor Detail

InternalMethod

public InternalMethod(Predicate head,
                      java.util.Vector<java.lang.String> labelsIn,
                      java.util.Vector<LogicalPrecondition> presIn,
                      java.util.Vector<TaskList> subsIn)
To initialize an InternalMethod object.

Parameters:
head - head of the method (i.e., the compound task which can be decomposed by using this method).
labelsIn - a Vector of String labels.
presIn - a Vector of logical preconditions.
subsIn - a Vector of task lists.
Method Detail

toCode

public java.lang.String toCode()
This function produces the Java code needed to implement this method.

Specified by:
toCode in class CompileTimeObject
Returns:
the produced code as a String.