VASSAL.tools
Class UniqueIdManager

java.lang.Object
  |
  +--VASSAL.tools.UniqueIdManager

public class UniqueIdManager
extends java.lang.Object

A class for assigning unique identifiers to objects. Identifiers will be of the form prefix#, where prefix is specified at initialization and the # is an increasing digit. When an object is removed, the other objects are reassigned identifiers so that they end up with the same identifier they would have if the removed object had never existed


Inner Class Summary
static interface UniqueIdManager.Identifyable
          An object with an identifier that can be manipulated by a UniqueIdManager
 
Constructor Summary
UniqueIdManager(java.lang.String prefix)
           
 
Method Summary
 void add(UniqueIdManager.Identifyable i)
           
 void remove(UniqueIdManager.Identifyable i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueIdManager

public UniqueIdManager(java.lang.String prefix)
Method Detail

add

public void add(UniqueIdManager.Identifyable i)

remove

public void remove(UniqueIdManager.Identifyable i)