es.ucm.look.data
Class EntityData

java.lang.Object
  extended by es.ucm.look.data.EntityData

public class EntityData
extends java.lang.Object

Class holding the minimum data to represent an entity


Constructor Summary
EntityData()
           
EntityData(int id, java.lang.String type)
           
EntityData(int id, java.lang.String type, float x, float y, float z)
          Constructs an entity with the given id, type and location
EntityData(int id, java.lang.String type, float x, float y, float z, java.util.Map<java.lang.String,java.lang.String> properties)
           
EntityData(java.lang.String type)
           
 
Method Summary
 int getId()
          Returns the unique id for the entity
 Point3 getLocation()
          Returns the location for the entity
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getPropertyValue(java.lang.String key)
          Returns the value for the given key
 java.lang.String getType()
          Returns entity's type
 void setId(int id)
           
 void setLocation(float x, float y, float z)
          Sets the location for this entity
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
          Sets the properties for this entity
 void setPropertyValue(java.lang.String key, java.lang.String value)
          Sets a the property value for the given key
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityData

public EntityData()

EntityData

public EntityData(int id,
                  java.lang.String type)

EntityData

public EntityData(int id,
                  java.lang.String type,
                  float x,
                  float y,
                  float z)
Constructs an entity with the given id, type and location

Parameters:
id - the id
type - the type
x - the x coordinate
y - the y coordinate
z - the z coordinate

EntityData

public EntityData(int id,
                  java.lang.String type,
                  float x,
                  float y,
                  float z,
                  java.util.Map<java.lang.String,java.lang.String> properties)

EntityData

public EntityData(java.lang.String type)
Method Detail

getId

public int getId()
Returns the unique id for the entity

Returns:
the unique id for the entity

getLocation

public Point3 getLocation()
Returns the location for the entity

Returns:
the location for the entity

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String key)
Returns the value for the given key

Parameters:
key - the key
Returns:
the value

getType

public java.lang.String getType()
Returns entity's type

Returns:
entity's type

setId

public void setId(int id)

setLocation

public void setLocation(float x,
                        float y,
                        float z)
Sets the location for this entity

Parameters:
x - x coordinate
y - y coordinate
z - z coordinate

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties for this entity

Parameters:
properties - the properties

setPropertyValue

public void setPropertyValue(java.lang.String key,
                             java.lang.String value)
Sets a the property value for the given key

Parameters:
key - the key
value - the value for the property