The first form of the ObjID
constructor generates a unique object identifier. The second constructor generates well-known object identifiers (such as those used by the registry and the distributed garbage collector) and takes as an argument a well-known object number. A well-known object ID generated via this second constructor will not clash with any object IDs generated via the default constructor; to enforce this, the object number of the ObjID
is set to the "well-known" number supplied in the constructor and all UID
fields are set to zero.
The method write
marshals the object ID's representation to an output stream.
The method read
constructs an object ID whose contents is read from the specified input stream.
The method hashCode
returns the object number as the hashcode
The equals
method returns true if obj is an ObjID
with the same contents.
The toString
method returns a string containing the object ID representation. The address space identifier is included in the string representation only if the object ID is from a non-local address space.