Class DefaultVisionGenerator
- java.lang.Object
- 
- jadex.commons.SimplePropertyObject
- 
- jadex.extension.envsupport.environment.space2d.DefaultVisionGenerator
 
 
- 
- All Implemented Interfaces:
- IPropertyObject,- IEnvironmentListener,- IPerceptGenerator
 
 public class DefaultVisionGenerator extends SimplePropertyObject implements IPerceptGenerator Percept generator for moving components.
- 
- 
Field SummaryFields Modifier and Type Field Description protected MultiCollection<java.lang.String,java.lang.String>actiontypesThe percept receiving component types.static java.lang.StringAPPEAREDThe appeared percept type.static java.lang.StringCREATEDThe created percept type.static java.lang.StringDESTROYEDThe destroyed percept type.static java.lang.StringDISAPPEAREDThe disappeared percept type.protected static ISpaceObject[]EMPTY_SPACEOBJECTSEmpty spaceobjects array.static java.lang.StringMOVEDThe moved percept type.static java.lang.StringPROPERTY_MAXRANGEThe maxrange property.static java.lang.StringPROPERTY_PERCEPTTYPESThe percept types property.static java.lang.StringPROPERTY_RANGEThe maxrange property.- 
Fields inherited from class jadex.commons.SimplePropertyObjectpcs, properties
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultVisionGenerator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomponentAdded(IComponentDescription component, IEnvironmentSpace space)Called when an component was added to the space.voidcomponentRemoved(IComponentDescription component, IEnvironmentSpace space)Called when an component was remove from the space.voiddispatchEnvironmentEvent(EnvironmentEvent event)Dispatch an environment event to this listener.protected java.util.Set<java.lang.String>getActionTypes(PerceptType pt)Get the action types for a percept.protected IVector1getDefaultRange()Get the default range.protected java.lang.StringgetPerceptType(IEnvironmentSpace space, java.lang.String componenttype, java.lang.String objecttype, java.lang.String actiontype)Get the percept type.protected java.lang.Object[]getPerceptTypes()Get the percept types defined for this generator.protected IVector1getRange(ISpaceObject avatar)Get the range.protected java.lang.StringgetRangePropertyName()Get the range property name.- 
Methods inherited from class jadex.commons.SimplePropertyObjectaddPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.IPropertyObjectgetProperty, getPropertyNames, hasProperty, setProperty
 
- 
 
- 
- 
- 
Field Detail- 
PROPERTY_MAXRANGEpublic static final java.lang.String PROPERTY_MAXRANGE The maxrange property.- See Also:
- Constant Field Values
 
 - 
PROPERTY_RANGEpublic static final java.lang.String PROPERTY_RANGE The maxrange property.- See Also:
- Constant Field Values
 
 - 
PROPERTY_PERCEPTTYPESpublic static final java.lang.String PROPERTY_PERCEPTTYPES The percept types property.- See Also:
- Constant Field Values
 
 - 
APPEAREDpublic static final java.lang.String APPEARED The appeared percept type.- See Also:
- Constant Field Values
 
 - 
DISAPPEAREDpublic static final java.lang.String DISAPPEARED The disappeared percept type.- See Also:
- Constant Field Values
 
 - 
CREATEDpublic static final java.lang.String CREATED The created percept type.- See Also:
- Constant Field Values
 
 - 
DESTROYEDpublic static final java.lang.String DESTROYED The destroyed percept type.- See Also:
- Constant Field Values
 
 - 
MOVEDpublic static final java.lang.String MOVED The moved percept type.- See Also:
- Constant Field Values
 
 - 
EMPTY_SPACEOBJECTSprotected static final ISpaceObject[] EMPTY_SPACEOBJECTS Empty spaceobjects array.
 - 
actiontypesprotected MultiCollection<java.lang.String,java.lang.String> actiontypes The percept receiving component types.
 
- 
 - 
Method Detail- 
componentAddedpublic void componentAdded(IComponentDescription component, IEnvironmentSpace space) Called when an component was added to the space.- Specified by:
- componentAddedin interface- IPerceptGenerator
- Parameters:
- component- The component identifier.
- space- The space.
 
 - 
componentRemovedpublic void componentRemoved(IComponentDescription component, IEnvironmentSpace space) Called when an component was remove from the space.- Specified by:
- componentRemovedin interface- IPerceptGenerator
- Parameters:
- component- The component identifier.
- space- The space.
 
 - 
dispatchEnvironmentEventpublic void dispatchEnvironmentEvent(EnvironmentEvent event) Dispatch an environment event to this listener.- Specified by:
- dispatchEnvironmentEventin interface- IEnvironmentListener
- Parameters:
- event- The event.
 
 - 
getPerceptTypeprotected java.lang.String getPerceptType(IEnvironmentSpace space, java.lang.String componenttype, java.lang.String objecttype, java.lang.String actiontype) Get the percept type.- Parameters:
- space- The space.
- componenttype- The component type.
- objecttype- The object type.
- actiontype- The action type.
- Returns:
- The matching percept.
 
 - 
getActionTypesprotected java.util.Set<java.lang.String> getActionTypes(PerceptType pt) Get the action types for a percept.- Parameters:
- pt- The percept type.
 
 - 
getPerceptTypesprotected java.lang.Object[] getPerceptTypes() Get the percept types defined for this generator.- Returns:
- The percept types.
 
 - 
getRangeprotected IVector1 getRange(ISpaceObject avatar) Get the range.- Returns:
- The range.
 
 - 
getDefaultRangeprotected IVector1 getDefaultRange() Get the default range.- Returns:
- The range.
 
 - 
getRangePropertyNameprotected java.lang.String getRangePropertyName() Get the range property name.- Returns:
- The range property name.
 
 
- 
 
-