cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class EntityCompositeImpl

Package class diagram package EntityCompositeImpl
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.EntityCompositeImpl
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ILocated, IViewable, ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event

public class EntityCompositeImpl
extends Entity

Composite implementation of the ENT abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

Complete message documentation: Generic physical entity that may be present in the world. Works as a hook for custom objects, such as new items from EmohawkRPG extension.


Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
Entity.EntityUpdate, Entity.ObjectDisappeared
 
Field Summary
protected  EntityLocalImpl partLocal
           
protected  EntityStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
PROTOTYPE, SimTime
 
Constructor Summary
EntityCompositeImpl()
          Parameter-less contructor for the message.
EntityCompositeImpl(EntityCompositeImpl original)
          Cloning constructor.
EntityCompositeImpl(EntityLocalImpl partLocal, EntitySharedImpl partShared, EntityStaticImpl partStatic)
          Composite-impl constructor.
 
Method Summary
 String getEntityClass()
          Type (category) of the entity.
 UnrealId getId()
          Unique Id of the item.
 EntityLocal getLocal()
           
 Location getLocation()
          Location of the item.
 Rotation getRotation()
          Rotation of the item.
 EntityShared getShared()
           
 EntityStatic getStatic()
           
 String getType()
          Type (category) of the entity.
 Velocity getVelocity()
          Velocity of the item.
 boolean isVisible()
          If the item is in the field of view of the bot.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
createDisappearEvent, getSimTime, toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected EntityStaticImpl partStatic

partLocal

protected EntityLocalImpl partLocal
Constructor Detail

EntityCompositeImpl

public EntityCompositeImpl()
Parameter-less contructor for the message.


EntityCompositeImpl

public EntityCompositeImpl(EntityLocalImpl partLocal,
                           EntitySharedImpl partShared,
                           EntityStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

EntityCompositeImpl

public EntityCompositeImpl(EntityCompositeImpl original)
Cloning constructor.

Parameters:
original -
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: Entity
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class Entity

getStatic

public EntityStatic getStatic()

getLocal

public EntityLocal getLocal()

getShared

public EntityShared getShared()

getId

public UnrealId getId()
Description copied from class: Entity
Unique Id of the item. This Id represents some entity in the world.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class Entity

isVisible

public boolean isVisible()
Description copied from class: Entity
If the item is in the field of view of the bot.

Specified by:
isVisible in interface IViewable
Specified by:
isVisible in class Entity

getLocation

public Location getLocation()
Description copied from class: Entity
Location of the item.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class Entity

getRotation

public Rotation getRotation()
Description copied from class: Entity
Rotation of the item.

Specified by:
getRotation in class Entity

getVelocity

public Velocity getVelocity()
Description copied from class: Entity
Velocity of the item.

Specified by:
getVelocity in class Entity

getType

public String getType()
Description copied from class: Entity
Type (category) of the entity.

Specified by:
getType in class Entity

getEntityClass

public String getEntityClass()
Description copied from class: Entity
Type (category) of the entity.

Specified by:
getEntityClass in class Entity

toString

public String toString()
Overrides:
toString in class Entity

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class Entity


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