|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jason.asSyntax.PlanLibrary
public class PlanLibrary
Represents a set of plans used by an agent
Field Summary | |
---|---|
static Trigger |
TE_IDLE
|
Constructor Summary | |
---|---|
PlanLibrary()
|
Method Summary | |
---|---|
void |
add(Plan p)
|
void |
add(Plan p,
boolean before)
Adds a plan into the plan library, either before or after all other plans depending on the boolean parameter. |
Plan |
add(Plan p,
Term source,
boolean before)
Add a new plan in PL. |
Plan |
add(StringTerm stPlan,
Term tSource)
Deprecated. parse the plan before (ASSyntax methods) and call add(Plan, ...) methods |
Plan |
add(StringTerm stPlan,
Term tSource,
boolean before)
Deprecated. parse the plan before (ASSyntax methods) and call add(Plan, ...) methods |
void |
addAll(java.util.List<Plan> plans)
|
void |
addAll(PlanLibrary pl)
|
void |
clear()
remove all plans |
PlanLibrary |
clone()
|
Plan |
get(java.lang.String label)
return a plan for a label |
java.util.List<Plan> |
getAllRelevant(Trigger te)
Deprecated. use getCandidatePlans(te) instead |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML |
java.util.List<Plan> |
getCandidatePlans(Trigger te)
|
java.util.List<Plan> |
getIdlePlans()
|
java.util.List<Plan> |
getPlans()
|
boolean |
hasCandidatePlan(Trigger te)
|
boolean |
hasMetaEventPlans()
|
boolean |
isRelevant(Trigger te)
Deprecated. use hasCandidatePlan(te) instead |
java.util.Iterator<Plan> |
iterator()
|
boolean |
remove(Atom pLabel,
Term source)
Remove a plan represented by the label pLabel. |
Plan |
remove(java.lang.String pLabel)
remove the plan with label pLabel |
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Trigger TE_IDLE
Constructor Detail |
---|
public PlanLibrary()
Method Detail |
---|
public Plan add(StringTerm stPlan, Term tSource) throws jason.asSyntax.parser.ParseException, JasonException
jason.asSyntax.parser.ParseException
JasonException
public Plan add(StringTerm stPlan, Term tSource, boolean before) throws jason.asSyntax.parser.ParseException, JasonException
jason.asSyntax.parser.ParseException
JasonException
public Plan add(Plan p, Term source, boolean before) throws JasonException
JasonException
public void add(Plan p) throws JasonException
JasonException
public void add(Plan p, boolean before) throws JasonException
p
- The plan to be added to the plan librarybefore
- Whether or not to place the new plan before others
JasonException
public void addAll(PlanLibrary pl) throws JasonException
JasonException
public void addAll(java.util.List<Plan> plans) throws JasonException
JasonException
public boolean hasMetaEventPlans()
public Plan get(java.lang.String label)
public int size()
public java.util.List<Plan> getPlans()
public java.util.Iterator<Plan> iterator()
iterator
in interface java.lang.Iterable<Plan>
public void clear()
public boolean remove(Atom pLabel, Term source)
public Plan remove(java.lang.String pLabel)
public boolean isRelevant(Trigger te)
public boolean hasCandidatePlan(Trigger te)
public java.util.List<Plan> getAllRelevant(Trigger te)
public java.util.List<Plan> getCandidatePlans(Trigger te)
public java.util.List<Plan> getIdlePlans()
public PlanLibrary clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |