cz.cuni.amis.pogamut.base.communication.worldview.object
Interface IWorldObjectEventListener<OBJECT extends IWorldObject,EVENT extends IWorldObjectEvent<OBJECT>>

Package class diagram package IWorldObjectEventListener
All Superinterfaces:
EventListener, cz.cuni.amis.utils.listener.IListener<EVENT>, IWorldEventListener<EVENT>
All Known Subinterfaces:
IWorldObjectListener<OBJECT>
All Known Implementing Classes:
Vision

public interface IWorldObjectEventListener<OBJECT extends IWorldObject,EVENT extends IWorldObjectEvent<OBJECT>>
extends IWorldEventListener<EVENT>

Listens on object events.

Don't be afraid of class's parameters :-) ... it allows you to specify type of objects you want to listen to and type of events you want to accept.

If you want to listen to more then one type of events / objects then specify these parameters as common ancestor of events / objects you want to accept inside the listener's notify() method.

This approach allows you to work with specific types of object / events directly in the notify() method sparing you of casting these event to the correct class.

Note: if you do not care about the EVENT class (which is very common), try using IWorldObjectListener that only requires to specify and object class as template parameters.

Author:
Jimmy

Nested Class Summary
 
Nested classes/interfaces inherited from interface cz.cuni.amis.utils.listener.IListener
cz.cuni.amis.utils.listener.IListener.Notifier<LISTENER extends cz.cuni.amis.utils.listener.IListener>
 
Method Summary
 
Methods inherited from interface cz.cuni.amis.utils.listener.IListener
notify
 



Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.