|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSHOP2.Plan
public class Plan
This class represent a plan as a LinkedList
of ground
instances of operators.
Field Summary | |
---|---|
private double |
cost
The cost of the plan. |
(package private) static java.lang.String |
endl
The new line character in the platform JSHOP2 is running on. |
private java.util.LinkedList<Predicate> |
ops
The plan as a LinkedList of ground instances of operators. |
Constructor Summary | |
---|---|
|
Plan()
To initialize the plan to an empty list. |
private |
Plan(java.util.LinkedList<Predicate> opsIn,
double costIn)
This function is used by objects of this class to clone themselves. |
Method Summary | |
---|---|
double |
addOperator(Operator op,
Term[] binding)
To add an operator instance to the end of the plan. |
java.lang.Object |
clone()
To clone an object of this class. |
java.util.LinkedList<Predicate> |
getOps()
To get the sequence of operators represented by this object. |
void |
removeOperator(double opCost)
To remove the operator instance at the end of the plan. |
java.lang.String |
toString()
This function returns a printable String representation of
this plan. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double cost
static final java.lang.String endl
private java.util.LinkedList<Predicate> ops
LinkedList
of ground instances of operators.
Constructor Detail |
---|
public Plan()
private Plan(java.util.LinkedList<Predicate> opsIn, double costIn)
opsIn
- the operators in the plan.costIn
- the cost of the plan.Method Detail |
---|
public double addOperator(Operator op, Term[] binding)
op
- the operator the instance of which is being added.binding
- the binding to instantiate the operator.
public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.LinkedList<Predicate> getOps()
LinkedList
of operator instances in this plan.public void removeOperator(double opCost)
opCost
- the cost of the operator instance to be removed.public java.lang.String toString()
String
representation of
this plan.
toString
in class java.lang.Object
String
representation of this plan.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |