public class Circumstance
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected ActionExec |
A |
protected java.util.List<Option> |
AP |
protected java.util.List<Option> |
RP |
protected Event |
SE |
protected Intention |
SI |
protected Option |
SO |
Constructor and Description |
---|
Circumstance() |
Modifier and Type | Method and Description |
---|---|
Event |
addAchvGoal(Literal l,
Intention i) |
void |
addEvent(Event ev)
Events
|
void |
addEventListener(CircumstanceListener el)
Listeners
|
void |
addExternalEv(Trigger trig) |
void |
addFeedbackAction(ActionExec act) |
void |
addIntention(Intention intention) |
void |
addMsg(Message m) |
void |
addPendingAction(ActionExec a) |
void |
addPendingEvent(java.lang.String id,
Event e) |
void |
addPendingIntention(java.lang.String id,
Intention i) |
void |
clearEvents() |
void |
clearIntentions() |
void |
clearPendingActions() |
void |
clearPendingEvents() |
void |
clearPendingIntentions() |
Circumstance |
clone()
clone E, I, MB, PA, PI, FA, and AI
|
void |
create()
creates new collections for E, I, MB, PA, PI, and FA
|
boolean |
dropIntention(Intention i)
removes and produces events to signal that the intention was dropped
|
boolean |
dropPendingAction(Intention i)
removes the intention i from PA and notify listeners that the intention was dropped
|
boolean |
dropPendingIntention(Intention i)
removes the intention i from PI and notify listeners that the intention was dropped
|
ActionExec |
getAction()
actions
|
java.util.List<Option> |
getApplicablePlans() |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get the agent circumstance as XML
|
Event |
getAtomicEvent() |
java.util.Queue<Event> |
getEvents()
get the queue of events (which does not include the atomic event)
|
java.util.Iterator<Event> |
getEventsPlusAtomic()
get the all events (which include the atomic event, if it exists)
|
java.util.List<ActionExec> |
getFeedbackActions() |
java.util.List<ActionExec> |
getFeedbackActionsWrapper() |
java.util.Queue<Intention> |
getIntentions()
get the queue of intention (which does not include atomic intention)
|
java.util.Iterator<Intention> |
getIntentionsPlusAtomic()
get the all intentions (which include the atomic intention, if it exists)
|
java.util.Collection<CircumstanceListener> |
getListeners() |
java.util.Queue<Message> |
getMailBox()
Messages
|
java.util.Map<java.lang.Integer,ActionExec> |
getPendingActions()
pending action
|
java.util.Map<java.lang.String,Event> |
getPendingEvents()
pending events
|
java.util.Map<java.lang.String,Intention> |
getPendingIntentions()
pending intentions
|
java.util.List<Option> |
getRelevantPlans() |
Event |
getSelectedEvent() |
Intention |
getSelectedIntention() |
Option |
getSelectedOption() |
boolean |
hasAtomicIntention() |
boolean |
hasEvent() |
boolean |
hasFeedbackAction()
feedback action
|
boolean |
hasIntention() |
boolean |
hasIntention(Intention i) |
boolean |
hasListener() |
boolean |
hasMsg() |
boolean |
hasPendingAction() |
boolean |
hasPendingEvent() |
boolean |
hasPendingIntention() |
void |
insertMetaEvent(Event ev) |
boolean |
isAtomicIntentionSuspended() |
Event |
removeAtomicEvent()
remove and returns the event with atomic intention, null if none
|
Intention |
removeAtomicIntention() |
boolean |
removeEvent(Event ev) |
void |
removeEventListener(CircumstanceListener el) |
boolean |
removeIntention(Intention i) |
ActionExec |
removePendingAction(int intentionId) |
Event |
removePendingEvent(java.lang.String pendingId) |
Intention |
removePendingIntention(int intentionId) |
Intention |
removePendingIntention(java.lang.String pendingId) |
void |
reset()
set null for A, RP, AP, SE, SO, and SI
|
void |
resumeIntention(Intention intention)
add the intention back to I, and also notify meta listeners that the goals are resumed
|
void |
setAction(ActionExec a) |
void |
setAtomicIntention(Intention i) |
void |
setTS(TransitionSystem ts) |
java.lang.String |
toString() |
protected ActionExec A
protected java.util.List<Option> RP
protected java.util.List<Option> AP
protected Event SE
protected Option SO
protected Intention SI
public void setTS(TransitionSystem ts)
public void create()
public void reset()
public void addExternalEv(Trigger trig)
public void addEvent(Event ev)
public void insertMetaEvent(Event ev)
public boolean removeEvent(Event ev)
public void clearEvents()
public java.util.Queue<Event> getEvents()
public java.util.Iterator<Event> getEventsPlusAtomic()
public boolean hasEvent()
public Event getAtomicEvent()
public Event removeAtomicEvent()
public void addEventListener(CircumstanceListener el)
public void removeEventListener(CircumstanceListener el)
public boolean hasListener()
public java.util.Collection<CircumstanceListener> getListeners()
public java.util.Queue<Message> getMailBox()
public void addMsg(Message m)
public boolean hasMsg()
public java.util.Queue<Intention> getIntentions()
public java.util.Iterator<Intention> getIntentionsPlusAtomic()
public boolean hasIntention()
public boolean hasIntention(Intention i)
public void addIntention(Intention intention)
public void resumeIntention(Intention intention)
public boolean removeIntention(Intention i)
public boolean dropIntention(Intention i)
public void clearIntentions()
public void setAtomicIntention(Intention i)
public Intention removeAtomicIntention()
public boolean hasAtomicIntention()
public boolean isAtomicIntentionSuspended()
public java.util.Map<java.lang.String,Intention> getPendingIntentions()
public boolean hasPendingIntention()
public void clearPendingIntentions()
public void addPendingIntention(java.lang.String id, Intention i)
public Intention removePendingIntention(java.lang.String pendingId)
public Intention removePendingIntention(int intentionId)
public boolean dropPendingIntention(Intention i)
public java.util.Map<java.lang.String,Event> getPendingEvents()
public boolean hasPendingEvent()
public void clearPendingEvents()
public void addPendingEvent(java.lang.String id, Event e)
public Event removePendingEvent(java.lang.String pendingId)
public ActionExec getAction()
public void setAction(ActionExec a)
public java.util.List<Option> getApplicablePlans()
public boolean hasFeedbackAction()
public java.util.List<ActionExec> getFeedbackActions()
public java.util.List<ActionExec> getFeedbackActionsWrapper()
public void addFeedbackAction(ActionExec act)
public java.util.Map<java.lang.Integer,ActionExec> getPendingActions()
public void addPendingAction(ActionExec a)
public void clearPendingActions()
public boolean hasPendingAction()
public ActionExec removePendingAction(int intentionId)
public boolean dropPendingAction(Intention i)
public java.util.List<Option> getRelevantPlans()
public Event getSelectedEvent()
public Intention getSelectedIntention()
public Option getSelectedOption()
public Circumstance clone()
clone
in class java.lang.Object
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
public java.lang.String toString()
toString
in class java.lang.Object