public class SensoryObjectManager<O extends ISensoryObject,L extends IObjectListener<O>> extends GeneralObjectManager<O,L>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> |
_byAgent |
protected java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> |
_bySensor |
Constructor and Description |
---|
SensoryObjectManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.util.Collection<O> objects)
add all of the objects to the manager and fire an appropriate event
|
boolean |
add(O object)
add the specific simulation object and fire the add event
|
protected void |
addBy(ISensoryIdentifier id) |
protected java.util.Collection<IIdentifier> |
getIdentifierBy(java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> map,
IIdentifier identifier,
boolean create) |
java.util.Collection<IIdentifier> |
getIdentifiersByAgent(IIdentifier agentId) |
java.util.Collection<IIdentifier> |
getIdentifiersBySensor(IIdentifier sensorId) |
boolean |
remove(java.util.Collection<IIdentifier> ids)
remove all the objects that are keyed on identifier.
|
boolean |
remove(IIdentifier identifier)
remove said object and fire event
|
protected void |
removeBy(ISensoryIdentifier id) |
addListener, contains, fire, fireUpdate, get, getIdentifiers, getListeners, hasListeners, removeListener, update, update, waitForChange
protected java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> _bySensor
protected java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> _byAgent
protected java.util.Collection<IIdentifier> getIdentifierBy(java.util.Map<IIdentifier,java.util.Collection<IIdentifier>> map, IIdentifier identifier, boolean create)
public java.util.Collection<IIdentifier> getIdentifiersByAgent(IIdentifier agentId)
public java.util.Collection<IIdentifier> getIdentifiersBySensor(IIdentifier sensorId)
protected void addBy(ISensoryIdentifier id)
protected void removeBy(ISensoryIdentifier id)
public boolean add(O object)
add
in interface IMutableObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
add
in class GeneralObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
public boolean add(java.util.Collection<O> objects)
GeneralObjectManager
add
in interface IMutableObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
add
in class GeneralObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
public boolean remove(IIdentifier identifier)
remove
in interface IMutableObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
remove
in class GeneralObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
identifier
- public boolean remove(java.util.Collection<IIdentifier> ids)
GeneralObjectManager
remove
in interface IMutableObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>
remove
in class GeneralObjectManager<O extends ISensoryObject,L extends IObjectListener<O>>