cz.cuni.amis.pogamut.base.communication.worldview.object.event
Class WorldObjectEvent<T extends IWorldObject>

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectEvent<T>
All Implemented Interfaces:
IWorldEvent, IWorldObjectEvent<T>, Event
Direct Known Subclasses:
WorldObjectAppearedEvent, WorldObjectDestroyedEvent, WorldObjectDisappearedEvent, WorldObjectFirstEncounteredEvent, WorldObjectUpdatedEvent

public class WorldObjectEvent<T extends IWorldObject>
extends java.lang.Object
implements IWorldObjectEvent<T>

Default world object event implementation wrapping some object inside the event.


Constructor Summary
WorldObjectEvent(T object, long simTime)
           
 
Method Summary
 WorldObjectId getId()
          Id of the object where the event has occurred.
 T getObject()
          Instance of the object.
 long getSimTime()
          Returns the simulation time when the event has occurred.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorldObjectEvent

public WorldObjectEvent(T object,
                        long simTime)
Method Detail

getId

public WorldObjectId getId()
Description copied from interface: IWorldObjectEvent
Id of the object where the event has occurred.

Specified by:
getId in interface IWorldObjectEvent<T extends IWorldObject>
Returns:

getObject

public T getObject()
Description copied from interface: IWorldObjectEvent
Instance of the object.

Specified by:
getObject in interface IWorldObjectEvent<T extends IWorldObject>
Returns:

getSimTime

public long getSimTime()
Description copied from interface: IWorldEvent
Returns the simulation time when the event has occurred.

Specified by:
getSimTime in interface IWorldEvent
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object