Class PerceptList
- java.lang.Object
 - 
- jadex.extension.envsupport.environment.PerceptList
 
 
- 
public class PerceptList extends java.lang.ObjectThe list of scheduled component percepts and convenience methods for processing selected percepts. This implementation is not thread-safe, i.e. methods should only be called from threads that are already synchronized with the environment space monitor. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPerceptList.PerceptEntryEntry for a scheduled percept. 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<PerceptList.PerceptEntry>perceptsThe scheduled percepts.protected IEnvironmentSpacespaceThe environment space. 
- 
Constructor Summary
Constructors Constructor Description PerceptList(IEnvironmentSpace space)Create a new percept list. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessPercepts(IFilter<PerceptList.PerceptEntry> filter)Process scheduled percepts.voidschedulePercept(java.lang.String type, java.lang.Object data, IComponentDescription component, ISpaceObject avatar, IPerceptProcessor processor)Schedules a percept.voidsetOrdering(java.util.Comparator<PerceptList.PerceptEntry> comp)Set an ordering used for executing actions. 
 - 
 
- 
- 
Field Detail
- 
space
protected IEnvironmentSpace space
The environment space. 
- 
percepts
protected java.util.Set<PerceptList.PerceptEntry> percepts
The scheduled percepts. 
 - 
 
- 
Constructor Detail
- 
PerceptList
public PerceptList(IEnvironmentSpace space)
Create a new percept list. 
 - 
 
- 
Method Detail
- 
schedulePercept
public void schedulePercept(java.lang.String type, java.lang.Object data, IComponentDescription component, ISpaceObject avatar, IPerceptProcessor processor)Schedules a percept.- Parameters:
 type- The percept type.data- The content of the percept (if any).component- The component that should receive the percept.avatar- The avatar of the component (if any).processor- The percept processor.
 
- 
setOrdering
public void setOrdering(java.util.Comparator<PerceptList.PerceptEntry> comp)
Set an ordering used for executing actions.- Parameters:
 comp- The comparator representing the ordering.
 
- 
processPercepts
public void processPercepts(IFilter<PerceptList.PerceptEntry> filter)
Process scheduled percepts. Should be called on environment thread only.- Parameters:
 filter- A filter to select only a subset of percepts (or null for all percepts).
 
 - 
 
 -