1 package cz.cuni.amis.pogamut.base.communication.worldview.object; 2 3 import cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener; 4 5 /** 6 * Listens on object events. 7 * <p><p> 8 * Don't be afraid of class's parameters :-) ... it allows you to specify type of objects you want to listen to 9 * and type of events you want to accept. 10 * <p><p> 11 * If you want to listen to more then one type of events / objects then specify these parameters as 12 * common ancestor of events / objects you want to accept inside the listener's notify() method. 13 * <p><p> 14 * This approach allows you to work with specific types of object / events directly in the notify() method 15 * sparing you of casting these event to the correct class. 16 * <p><p> 17 * Note: if you do not care about the EVENT class (which is very common), try using {@link IWorldObjectListener} that 18 * only requires to specify and object class as template parameters. 19 * 20 * @author Jimmy 21 * @param OBJECT class of objects you're listening to 22 */ 23 public interface IWorldObjectEventListener<OBJECT extends IWorldObject, EVENT extends IWorldObjectEvent<OBJECT>> 24 extends IWorldEventListener<EVENT> { 25 26 }