Class ObjectIdTable

  extended by org.apache.woden.ant.ObjectIdTable

public class ObjectIdTable
extends java.lang.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.

Arthur Ryman (,

Constructor Summary
Method Summary
 int id(java.lang.Object o)
          Returns a unique integer for the equivalence class of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ObjectIdTable()
Method Detail


public int id(java.lang.Object o)
Returns a unique integer for the equivalence class of the object.

o - An object.
A unique id for the object.

Copyright © 2007. All Rights Reserved.