Rajarshi Guha <[EMAIL PROTECTED]> wrote:
>> It seems that 1) would be a little more involved in terms of coding,
> but also, by specifying a max depth, one might fail to properly clone
> an object in some cases (especially if max depth is set to a default).
>
> However all this is only relevant when the property is equal to the
> actual parent object - for components of a parent object I don't see
> that this is a problem. This observation could be used to simplify
This is not quite correct. The original case I've found yesterday was a
property of type RingSet, assigned to an Atom. The RingSet contains set of
Atoms, including the Atom itself.
nina
> option 1) leading to a clone method that looks like
>
> clone() throws .... {
>
> ChemObject clone = (ChemObject)super.clone();
>
> // get properties
> for key, property in properties
> if property.equals(this):
> cloneProperties.put(key.clone(), clone)
>
> ...
> return clone
> }
>
> -------------------------------------------------------------------
> Rajarshi Guha <[EMAIL PROTECTED]>
> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
> -------------------------------------------------------------------
> C Code.
> C Code Run.
> Run, Code, RUN!
> PLEASE!!!!
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Cdk-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user