|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IWorldObjectEventListener<OBJECT extends IWorldObject,EVENT extends IWorldObjectEvent<OBJECT>>
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 |
---|
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 |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |