cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class ItemMessage.ItemSharedMessage

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemMessage.ItemSharedMessage
All Implemented Interfaces:
IWorldObject, ILocated, ISharedWorldObject, java.lang.Cloneable
Enclosing class:
ItemMessage

public class ItemMessage.ItemSharedMessage
extends ItemShared

Implementation of the shared part of the GameBots2004 message INV, used to facade INVMessage.

Complete message documentation: Synchronous/asynchronous message. An object on the ground that can be picked up.


Field Summary
protected  BooleanProperty myDropped
          Whether it is regular item or one dropped by some bot (usually during dying).
protected  LocationProperty myLocation
          Location of the item.
protected  java.util.HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemShared
DroppedPropertyToken, LocationPropertyToken, SharedPropertyTokens, SimTime
 
Constructor Summary
ItemMessage.ItemSharedMessage()
           
 
Method Summary
 ItemMessage.ItemSharedMessage clone()
           
 UnrealId getId()
          Unique Id of the item.
 Location getLocation()
          Location of the item.
 java.util.Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 boolean isDropped()
          Whether it is regular item or one dropped by some bot (usually during dying).
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemShared
getCompositeClass, getSimTime, setSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected java.util.HashMap<PropertyId,ISharedProperty> propertyMap

myLocation

protected LocationProperty myLocation
Location of the item.


myDropped

protected BooleanProperty myDropped
Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.

Constructor Detail

ItemMessage.ItemSharedMessage

public ItemMessage.ItemSharedMessage()
Method Detail

clone

public ItemMessage.ItemSharedMessage clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class ItemShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

public java.util.Map<PropertyId,ISharedProperty> getProperties()

getId

public UnrealId getId()
Unique Id of the item. This Id represents just item on the map, not in our inventory.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class ItemShared
Returns:

getLocation

public Location getLocation()
Location of the item.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class ItemShared
Returns:
Current location of the object, represented as a point within the world's coordinates.

isDropped

public boolean isDropped()
Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.

Specified by:
isDropped in class ItemShared

toString

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

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class ItemShared