mil.navy.nps.relate
Class Thing

java.lang.Object
  extended bymil.navy.nps.relate.Thing
Direct Known Subclasses:
Agent

public abstract class Thing
extends java.lang.Object

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.

Since:
JDK1.3
Version:
1.0, 17 Aug 00
Author:
Michael R. Dickson, Kimberly A. Roddy

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

entityID

protected long entityID
The entityID is a unique identifier for this entity in the environment. No other entities should have the same ID.


entityName

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". The simulation developer is responsible for sselecting and tracking this variable.

Constructor Detail

Thing

public Thing(long pID,
             java.lang.String pName)
Two argument constructor for the "Thing" object


Thing

public Thing()
No argument constructor with an entityID of "0" and entityName of "Unnamed".

Method Detail

step

public abstract void step()
step() can be used by the developer to indicate a simulation cycle or discrete event occurrance.


drawSelf

public 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.


setEntityID

protected void setEntityID(long pID)
Sets the entityID to the passed in "Long" value


getEntityID

public long getEntityID()
Gets the unique entityID


setEntityName

protected void setEntityName(java.lang.String pEntityName)
Sets the entityName to the passed in "String" value


getEntityName

public java.lang.String getEntityName()
Gets the entityName