cz.cuni.amis.pogamut.defcon.communication.messages.infos
Class DefConObject

Package class diagram package DefConObject
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
All Implemented Interfaces:
IWorldObject
Direct Known Subclasses:
DefConViewableObject, InvalidObject, QueueItem

public abstract class DefConObject
extends Object
implements IWorldObject

World object message of arbitrary world that is run in the same JVM.

Author:
Jimmy, Black_Hand

Constructor Summary
DefConObject(DefConObject original)
          Creates a new DefConObject object.
DefConObject(int id, UnitType type, double time)
          Creates new object with specified id and time
 
Method Summary
 DefConObjectUpdate createDestroyedEvent()
          Returns update-event for the current object.
 DefConObjectUpdate createUpdateEvent()
          Returns update-event for the current object.
 boolean getDestroyed()
          DOCUMENT ME!
 WorldObjectId getId()
          Returns ID of the object.
 double getLastSeenTime()
          Returns the time of the last update of the object.
 long getSimTime()
          DOCUMENT ME!
 String getStringizedFields()
          DOCUMENT ME!
 UnitType getType()
          Returns type of this object.
protected  void setLastSeenTime(double time)
          Sets the last-seen-time of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefConObject

public DefConObject(int id,
                    UnitType type,
                    double time)
Creates new object with specified id and time

Parameters:
id - id set to the object
type - type of the unit
time - time set to the object

DefConObject

public DefConObject(DefConObject original)
Creates a new DefConObject object.

Parameters:
original - DOCUMENT ME!
Method Detail

getId

public WorldObjectId getId()
Returns ID of the object.

Specified by:
getId in interface IWorldObject
Returns:
ID

getType

public UnitType getType()
Returns type of this object.

Returns:
type

getLastSeenTime

public double getLastSeenTime()
Returns the time of the last update of the object.

Returns:
time

setLastSeenTime

protected void setLastSeenTime(double time)
Sets the last-seen-time of the object.

Parameters:
time -

getSimTime

public long getSimTime()
DOCUMENT ME!

Specified by:
getSimTime in interface IWorldObject
Returns:
DOCUMENT ME!

createUpdateEvent

public DefConObjectUpdate createUpdateEvent()
Returns update-event for the current object.

Returns:
update-event

createDestroyedEvent

public DefConObjectUpdate createDestroyedEvent()
Returns update-event for the current object.

Returns:
update-event

getDestroyed

public boolean getDestroyed()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getStringizedFields

public String getStringizedFields()
DOCUMENT ME!

Returns:
DOCUMENT ME!


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