[jdom-interest] Moving Children

Frank Sauer Frank.Sauer at trcinc.com
Fri Jun 15 12:19:55 PDT 2001


Maybe I'm completely confused (it has been a long night)
but if you call :

	((Object)whatever).clone();

won't that result in a call to the actual overridden clone() in the
actual class of whatever?

Frank Sauer
The Technical Resource Connection, Inc.
a wholly owned subsidiary of Perot Systems
Tampa, FL
http://www.trcinc.com
-----------------------------------------------
Java: The best argument for Smalltalk since C++


-----Original Message-----
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Friday, June 15, 2001 2:49 PM
To: Eric Rosenberg
Cc: Kevin Baynes; Jdom-Interest
Subject: Re: [jdom-interest] Moving Children


You can always cast to Object.  But it'd do no good.  Object's clone()
isn't public.

-jh-

Eric Rosenberg wrote:
> 
> Couldn't you cast to Object?
> 
> >
> > If you do the constructor above, then the clear() on the new list won't
> > change the backing list.  It'd work if you cast it to a LinkedList, but
> > that makes you dependent on the current List choice which is going to
> > change.  Too bad Cloneable doesn't have a clone() method.  If it did,
> > you could cast to Cloneable.
> >
> > Looks like writing a little utility method may be your most elegant
> > solution.
> >
> > -jh-
> > _______________________________________________
> > To control your jdom-interest membership:
> >
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list