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

All Superinterfaces:
java.util.EventListener, IListener<EVENT>, IWorldEventListener<EVENT>
All Known Subinterfaces:
IWorldObjectListener<OBJECT>
All Known Implementing Classes:
Items.ItemsListener, Items.NavPointListener, 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.


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