swarm.simtools
Interface UNameC

All Known Implementing Classes:
UNameCImpl

public interface UNameC
extends SwarmObjectC, SwarmObjectS

A class used to generate unique names (e.g. "critter1", "critter2" etc.). This class is used to generate unique names (agent0, agent1, agent2...) for objects in a simulation. The user will typically create an instance of the UName class initialized with a baseName presented either as a (const char *) or an object of class String. The user can then request new names, again either as (const char *)'s or as instances of the String class. The user can also reset the counter used to generate the names in case s/he wants to restart naming objects with the same baseName. Note: Both in the case of initialization by (const char *) and initialization by an instance of the String class, the original is copied not stored internally so it is up to the user to free the original (const char *) or String instance if/when necessary!


Method Summary
 java.lang.Object create$setBaseName(Zone aZone, java.lang.String aString)
          The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given a const char *.
 java.lang.Object create$setBaseNameObject(Zone aZone, java.lang.Object aStringObject)
          The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given an object of class String.
 java.lang.Object setBaseName(java.lang.String aString)
          The setBaseName: method is used to set the base name given a const char *.
 java.lang.Object setBaseNameObject(java.lang.Object aStringObject)
          The setBaseNameObject: method is used to set the base name given an object of class String.
 
Methods inherited from interface swarm.defobj.CreateC
create, createBegin, createEnd
 
Methods inherited from interface swarm.defobj.CustomizeC
customizeBegin, customizeCopy, customizeEnd
 

Method Detail

create$setBaseName

public java.lang.Object create$setBaseName(Zone aZone,
                                           java.lang.String aString)
The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given a const char *. This method will automatically reset the counter.

create$setBaseNameObject

public java.lang.Object create$setBaseNameObject(Zone aZone,
                                                 java.lang.Object aStringObject)
The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given an object of class String. This method will automatically reset the counter.

setBaseName

public java.lang.Object setBaseName(java.lang.String aString)
The setBaseName: method is used to set the base name given a const char *.

setBaseNameObject

public java.lang.Object setBaseNameObject(java.lang.Object aStringObject)
The setBaseNameObject: method is used to set the base name given an object of class String.