org.commonreality.object.manager
Interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>

All Superinterfaces:
IObjectManager<O,L>
All Known Subinterfaces:
IRequestableAfferentObjectManager, IRequestableEfferentObjectManager, IRequestableObjectManager<O,L>, IRequestableRealObjectManager
All Known Implementing Classes:
AfferentObjectManager, AgentObjectManager, EfferentCommandManager, EfferentObjectManager, GeneralObjectManager, RealObjectManager, RequestableAfferentObjectManager, RequestableEfferentCommandManager, RequestableEfferentObjectManager, RequestableRealObjectManager, SensorObjectManager, SensoryObjectManager

public interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>
extends IObjectManager<O,L>

The mutable object manager extends the IObjectManager to support the adding, removing, and updating of simulation objects.

add and remove are fairly obvious, update requires a little more finese.

Instead of directly updating objects, we use IObjectDelta which allow you to collect all the changes requested for an object and then apply them at once. The IObjectDelta is also sent as part of the event notification so that listeners know exactly what has changed.

Note, this has methods for the adding and removing of objects - not the creation of them. It is the IRequestableObjectManager that is able to create new objects since the creation has to go through CR.

Author:
developer
See Also:
IRequestableObjectManager, IObjectManager

Method Summary
 boolean add(java.util.Collection<O> objects)
           
 boolean add(O object)
          add the specific simulation object and fire the add event
 boolean remove(java.util.Collection<IIdentifier> identifiers)
           
 boolean remove(IIdentifier identifier)
          remove said object and fire event
 boolean update(java.util.Collection<IObjectDelta> deltas)
          update all of these bad boys.
 boolean update(IObjectDelta delta)
          update the object that's change is desrcibed by the delta and fire the appropriate event
 
Methods inherited from interface org.commonreality.object.manager.IObjectManager
addListener, get, getIdentifiers, getListeners, hasListeners, removeListener, waitForChange
 

Method Detail

add

boolean add(O object)
add the specific simulation object and fire the add event


add

boolean add(java.util.Collection<O> objects)

remove

boolean remove(IIdentifier identifier)
remove said object and fire event

Parameters:
identifier -

remove

boolean remove(java.util.Collection<IIdentifier> identifiers)

update

boolean update(IObjectDelta delta)
update the object that's change is desrcibed by the delta and fire the appropriate event

Parameters:
delta -

update

boolean update(java.util.Collection<IObjectDelta> deltas)
update all of these bad boys.

Parameters:
deltas -