|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.commonreality.object.manager.impl.GeneralObjectManager<O,L>
public class GeneralObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>
Handles the adding, updating, and removal of a specific type of simulation object - it also deals with the listeners. This class is generally hidden from users as they are generally encapsulated within the ObjectManager
| Constructor Summary | |
|---|---|
GeneralObjectManager()
|
|
| Method Summary | |
|---|---|
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 this single object and fire an event |
void |
addListener(L listener,
java.util.concurrent.Executor executor)
add a listener that will have its objectAdded,removed,updated methods fired appropriately on the provided executor |
boolean |
contains(IIdentifier identifier)
does this object manager have an object O that is keyed on this identifier |
O |
get(IIdentifier identifier)
return the object O that is keyed on identifier |
java.util.Collection<IIdentifier> |
getIdentifiers()
return all the identifiers that have matched objects |
java.util.Collection<L> |
getListeners()
return a collection containing all the installed listeners |
boolean |
hasListeners()
are there any registered listeners? |
boolean |
remove(java.util.Collection<IIdentifier> identifiers)
remove all the objects that are keyed on identifier. |
boolean |
remove(IIdentifier id)
remove the object that is keyed on id and fire an event |
void |
removeListener(L listener)
remove said listener |
boolean |
update(java.util.Collection<IObjectDelta> deltas)
update all these obejcts |
boolean |
update(IObjectDelta delta)
update the object that is described by this delta with this delta. |
void |
waitForChange()
wait until something has been added, removed, updated |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralObjectManager()
| Method Detail |
|---|
public void addListener(L listener,
java.util.concurrent.Executor executor)
addListener in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>listener - executor - public void removeListener(L listener)
removeListener in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>listener - public boolean hasListeners()
hasListeners in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>public java.util.Collection<L> getListeners()
getListeners in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>public boolean update(IObjectDelta delta)
update in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>delta - public boolean update(java.util.Collection<IObjectDelta> deltas)
update in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>deltas - public boolean add(O object)
add in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>object - public boolean add(java.util.Collection<O> objects)
add in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>objects - public boolean remove(IIdentifier id)
remove in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>id - public boolean remove(java.util.Collection<IIdentifier> identifiers)
remove in interface IMutableObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>identifiers - public O get(IIdentifier identifier)
get in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>identifier -
public java.util.Collection<IIdentifier> getIdentifiers()
getIdentifiers in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>public boolean contains(IIdentifier identifier)
identifier -
public void waitForChange()
throws java.lang.InterruptedException
IObjectManager
waitForChange in interface IObjectManager<O extends ISimulationObject,L extends IObjectListener<O>>java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||