public class Entity extends java.lang.Object implements Basic
Constructor and Description |
---|
Entity(Model model,
java.lang.String id,
java.lang.String entityTypeId,
java.lang.String state,
long time)
An new entity will indexed automaticly in classContent hashtable
|
Modifier and Type | Method and Description |
---|---|
void |
changeContainer(java.lang.String type,
java.lang.String id,
java.lang.String op,
long time)
An entity will be created, add or remove a container.
|
Grafic |
createGraficFree(long time)
creates an EntityGrafic instance for an free entity
|
Grafic |
createGraficStatic(java.lang.String viewId,
double positionX,
double positionY,
double angle,
boolean direction,
long time)
creates an EntityGrafic instance for an static entity with fixed position
|
void |
dispose()
Dispose this entity
|
boolean |
existAttribute(java.lang.String key)
check if attribute-key is valid
|
java.lang.String |
getAttribute(java.lang.String key)
get actual value of attribute
|
java.util.List<Attribute> |
getAttributeHistory(java.lang.String key)
get history vector of attribute
|
java.util.List<Attribute> |
getContainerHistory()
get vector of containerHistory
|
java.lang.String |
getEntityTypeId() |
Grafic |
getGrafic() |
java.lang.String |
getId() |
Model |
getModel() |
java.lang.String |
getName()
actual value of name-attribute
|
java.util.List<Attribute> |
getNameAttribute()
get vector with all historical name-keys
|
int |
getPriority()
get actual value of priority-attribute
|
java.util.List<Attribute> |
getPriorityAttribute()
get historical vector of priorities
|
java.lang.String |
getState()
get actual value of state
|
java.util.List<Attribute> |
getStateHistory()
get vector of state history
|
double |
getVelocity()
get actual velocity
|
java.util.List<Attribute> |
getVelocityAttribute()
get historical vector of velocity
|
boolean |
isFree()
An entity is static or it is in a container (list, route, process) or it is free
Only a free entity can put in to a container
|
boolean |
isStatic()
An entity has a fixed location
|
void |
setAttribute(java.lang.String key,
java.lang.String value,
long since)
set an attribute-value
|
void |
setNameAttribute(java.lang.String name,
long time)
set a new key of name-attribute
This seted attribute is used as name attribute.
|
void |
setPriorityAttribute(java.lang.String p,
long time)
sets new value of priority-attribute
|
void |
setState(java.lang.String state,
long time)
set new state-value
|
void |
setVelocityAttribute(java.lang.String v,
long time)
set new value of velocity-attribute
|
public Entity(Model model, java.lang.String id, java.lang.String entityTypeId, java.lang.String state, long time) throws ModelException
model
- used animation.model.Modelid
- entityId must be uniqueentityTypeId
- state
- initial statetime
- creation-timeModelException
public java.lang.String getId()
getId
in interface ClassBasic
public java.lang.String getName()
public void setNameAttribute(java.lang.String name, long time) throws ModelException
name
- new key of name-attributetime
- time of settingModelException
public java.util.List<Attribute> getNameAttribute()
public int getPriority()
public void setPriorityAttribute(java.lang.String p, long time) throws ModelException
p
- new priority-valuetime
- time of settingModelException
public java.util.List<Attribute> getPriorityAttribute()
public double getVelocity()
public void setVelocityAttribute(java.lang.String v, long time) throws ModelException
v
- new value of velocitytime
- time of settingModelException
public java.util.List<Attribute> getVelocityAttribute()
public java.lang.String getEntityTypeId()
public void setState(java.lang.String state, long time) throws ModelException
state
- new state-valuetime
- time of settingModelException
public java.lang.String getState()
public java.util.List<Attribute> getStateHistory()
public void changeContainer(java.lang.String type, java.lang.String id, java.lang.String op, long time) throws ModelException
type
- container-typ (route, list, ..)id
- container-id or "free" or "static"op
- add or remove or created or destroyedtime
- time of operationModelException,
- when type or id contains a Cmd.VALUE_SEPARATORModelException
public java.util.List<Attribute> getContainerHistory()
public boolean isFree()
public boolean isStatic()
public void setAttribute(java.lang.String key, java.lang.String value, long since)
key
- attribute-keyvalue
- attribute-valuesince
- time of settingpublic java.lang.String getAttribute(java.lang.String key)
key
- attribute-keypublic java.util.List<Attribute> getAttributeHistory(java.lang.String key)
key
- attribute-keypublic boolean existAttribute(java.lang.String key)
key
- public void dispose()
public Grafic createGraficFree(long time) throws ModelException
time
- time of creationModelException
public Grafic createGraficStatic(java.lang.String viewId, double positionX, double positionY, double angle, boolean direction, long time) throws ModelException
viewId
- Id of viewpositionY
- y-coordinateangle
- Drehwinkeldirection
- icon ist an y-achse gespiegelttime
- time of creationModelException