public class ObjectIdTable
extends Object
Provides a completely safe way to generate unique ids for equivalence classes of objects.
Equivalent objects are assigned the same ids.
Inequivalent objects are assigned different ids.
Here equivalance is defined by the equals() method which is used by HashMap.
Experience has shown that hashCode() occasionally produces the same hash for different objects.
Note that the objects are permanently stored, so only use this class when serializing
objects in an XML file.
A count is kept and assigned to each object equivalence class as it is added.
- Author:
- Arthur Ryman (ryman@ca.ibm.com, arthur.ryman@gmail.com)