|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmil.navy.nps.relate.Thing
This abstract class implements the RELATE Thing.
This is the minimal entity that can exist in a RELATE simulation. This class defines the minimum requirements for a Thing in the RELATE architecture. A Thing has a unique entity identification number and name with associated getter and setter methods. If the entity identification number and name are not provided in the constructor, a no-argument constructor will assign the number "0" and name "unnamed" to the Thing. The only other methods that a Thing has are the step() and drawSelf() abstract methods. The step() method is used to update the object and the drawSelf() method is used to update the appearance during the simulation run. Both methods are unique to each simulation and therefore must be defined by the developer.
Field Summary | |
protected long |
entityID
The entityID is a unique identifier for this entity in the environment. |
protected java.lang.String |
entityName
The entityName could be a unique name for the entity, or it could be a simple identifier such as "BlueTeam" or "RedTeam". |
Constructor Summary | |
Thing()
No argument constructor with an entityID of "0" and entityName of "Unnamed". |
|
Thing(long pID,
java.lang.String pName)
Two argument constructor for the "Thing" object |
Method Summary | |
abstract void |
drawSelf()
drawSelf() can be used by the developer to draw the geometry of the entity if there is to be a visual representation of the entity in the simulation. |
long |
getEntityID()
Gets the unique entityID |
java.lang.String |
getEntityName()
Gets the entityName |
protected void |
setEntityID(long pID)
Sets the entityID to the passed in "Long" value |
protected void |
setEntityName(java.lang.String pEntityName)
Sets the entityName to the passed in "String" value |
abstract void |
step()
step() can be used by the developer to indicate a simulation cycle or discrete event occurrance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected long entityID
protected java.lang.String entityName
Constructor Detail |
public Thing(long pID, java.lang.String pName)
public Thing()
Method Detail |
public abstract void step()
public abstract void drawSelf()
protected void setEntityID(long pID)
public long getEntityID()
protected void setEntityName(java.lang.String pEntityName)
public java.lang.String getEntityName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |