|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.pucrio.inf.les.bdijade.core.PlanLibrary
public class PlanLibrary
This class represents the plan library of a capability. It aggregates the plans that can be used to achieve goals.
| Field Summary | |
|---|---|
private Capability |
capability
|
private java.util.Set<Plan> |
plans
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
PlanLibrary()
Creates a plan library. |
|
PlanLibrary(java.util.Set<Plan> plans)
Creates a plan library base associated with a capability and adds the plans in the provided set. |
|
| Method Summary | |
|---|---|
void |
addPlan(Plan plan)
Adds a plan to the plan library. |
java.util.Set<Plan> |
canAchievePlans(Goal goal)
Returns the set of plans that can achieve the given goal. |
boolean |
canProcessPlans(jade.lang.acl.ACLMessage message)
Returns true if there is a plan that can process the given message. |
Capability |
getCapability()
|
java.util.Set<Plan> |
getPlans()
|
boolean |
hasPlan(Plan plan)
Checks if a plan is part of the plan library. |
protected void |
init()
Initialize the plan library, adding initial plans. |
boolean |
removePlan(Plan plan)
Removes a plan from the plan library. |
void |
setCapability(Capability capability)
Sets the capability of this plan library. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private Capability capability
private final java.util.Set<Plan> plans
| Constructor Detail |
|---|
public PlanLibrary()
public PlanLibrary(java.util.Set<Plan> plans)
plans - the initial plans| Method Detail |
|---|
public void addPlan(Plan plan)
plan - the plan to be added.public java.util.Set<Plan> canAchievePlans(Goal goal)
goal - the goal to be achieved.
public boolean canProcessPlans(jade.lang.acl.ACLMessage message)
message - the message to be processed.
public Capability getCapability()
public java.util.Set<Plan> getPlans()
public boolean hasPlan(Plan plan)
plan - the plan to be checked
protected void init()
public boolean removePlan(Plan plan)
plan - the plan to be removed.
public void setCapability(Capability capability)
RuntimeException. After setting the capability,
the init() method is invoked.
capability - the capability to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||