|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSHOP2.CompileTimeObject
JSHOP2.InternalElement
JSHOP2.InternalOperator
public class InternalOperator
Each operator at compile time is represented as an instance of this class.
Field Summary | |
---|---|
private java.util.Vector |
add
This operator's add list, a Vector of objects of type
DelAddElement . |
private static int |
classCnt
The number of objects already instantiated from this class. |
private Term |
cost
The cost of this operator. |
private java.util.Vector |
del
This operator's delete list, a Vector of objects of type
DelAddElement . |
private LogicalPrecondition |
pre
The logical precondition of this operator. |
Fields inherited from class JSHOP2.CompileTimeObject |
---|
endl |
Constructor Summary | |
---|---|
InternalOperator(Predicate head,
LogicalPrecondition preIn,
java.util.Vector delIn,
java.util.Vector addIn,
Term costIn)
To initialize an InternalOperator object. |
Method Summary | |
---|---|
java.lang.String |
toCode()
This function produces the Java code needed to implement this operator. |
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 |
---|
private java.util.Vector add
Vector
of objects of type
DelAddElement
. Note that a Vector
, rather than
an array, is used, since at compile time we do not know how many
delete/add elements there will be.
private static int classCnt
private Term cost
private java.util.Vector del
Vector
of objects of type
DelAddElement
. Note that a Vector
, rather than
an array, is used, since at compile time we do not know how many
delete/add elements there will be.
private LogicalPrecondition pre
Constructor Detail |
---|
public InternalOperator(Predicate head, LogicalPrecondition preIn, java.util.Vector delIn, java.util.Vector addIn, Term costIn)
InternalOperator
object.
head
- head of the operator (i.e., the primitive task that can be
achieved by applying this operator).preIn
- the logical precondition for this operator.delIn
- the delete list of the operator. The first element of the
Vector
is of type Integer
. If it is not
null
, it means that the delete list of this operator
is a variable, and the value of the Integer
shows
that variable's index. Otherwise, the rest of the
Vector
is of type DelAddElement
,
representing the atoms and protections that will be deleted from
the state of the world when this operator is applied.addIn
- the add list of the operator. The first element of the
Vector
is of type Integer
. If it is not
null
, it means that the add list of this operator
is a variable, and the value of the Integer
shows
that variable's index. Otherwise, the rest of the
Vector
is of type DelAddElement
,
representing the atoms and protections that will be added to the
state of the world when this operator is applied.costIn
- the cost of the operator.Method Detail |
---|
public java.lang.String toCode()
toCode
in class CompileTimeObject
String
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |