public class Capability
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Capability()
Creates a new capability.
|
Capability(BeliefBase beliefBase,
PlanLibrary planLibrary)
Creates a new capability.
|
Capability(java.lang.String id)
Creates a new capability.
|
Capability(java.lang.String id,
BeliefBase beliefBase,
PlanLibrary planLibrary)
Creates a new capability.
|
Capability(java.lang.String id,
Capability parent)
Creates a new capability.
|
Capability(java.lang.String id,
Capability parent,
BeliefBase beliefBase,
PlanLibrary planLibrary)
Creates a new capability.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Capability capability) |
boolean |
canProcess(jade.lang.acl.ACLMessage msg)
Checks if this capability has a plan that can process the given message.
|
BeliefBase |
getBeliefBase() |
java.util.Set<Capability> |
getChildren() |
java.lang.String |
getId() |
BDIAgent |
getMyAgent() |
Capability |
getParent() |
PlanLibrary |
getPlanLibrary() |
boolean |
hasChildren() |
boolean |
removeChild(Capability capability) |
void |
setMyAgent(BDIAgent myAgent) |
java.lang.String |
toString() |
public Capability()
BeliefBase and
PlanLibrary as belief base and plan library respectively.public Capability(BeliefBase beliefBase, PlanLibrary planLibrary)
beliefBase - the belief base of this capability.planLibrary - the plan library of this capability.public Capability(java.lang.String id)
BeliefBase and
PlanLibrary as belief base and plan library respectively.id - the capability id. If it is null, the class name is going to
be used.public Capability(java.lang.String id,
BeliefBase beliefBase,
PlanLibrary planLibrary)
id - the capability id. If it is null, the class name is going to
be used.beliefBase - the belief base of this capability.planLibrary - the plan library of this capability.public Capability(java.lang.String id,
Capability parent)
BeliefBase and
PlanLibrary as belief base and plan library respectively.id - the capability id. If it is null, the class name is going to
be used.parent - the parent of this capability.public Capability(java.lang.String id,
Capability parent,
BeliefBase beliefBase,
PlanLibrary planLibrary)
id - the capability id. If it is null, the class name is going to
be used.parent - the parent of this capability.beliefBase - the belief base of this capability.planLibrary - the plan library of this capability.public void addChild(Capability capability)
public boolean canProcess(jade.lang.acl.ACLMessage msg)
msg - the message to be checked.public BeliefBase getBeliefBase()
public java.util.Set<Capability> getChildren()
public java.lang.String getId()
public BDIAgent getMyAgent()
public Capability getParent()
public PlanLibrary getPlanLibrary()
public boolean hasChildren()
public boolean removeChild(Capability capability)
public void setMyAgent(BDIAgent myAgent)
myAgent - the myAgent to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()