Why didn't you made generic class with addElement? Methods can return that
generic class instead of real one. Of course, you'll maybe lose opportunity
to chain everything, but now classes a less flexible because you can't send
them as generic parent. Eg. I wanted to send any of P, B, I... classes to
sam generic methods and that can't be done.
At 15:41 21.12.99 -0800, you wrote:
>on 12/21/99 1:12 PM, Patrick Flahan <[EMAIL PROTECTED]> wrote:
>
>> I noticed in the API documentation that some of the set methods return a
>> reference and some don't. Is there a design reason for this?
>>
>> Patrick
>
>Of course this is a design reason for this. We are not idiots. ;-)
>
>It would mean that each and every single element would have to be modified
>specially to return its own type. In other words, quite a HUGE amount of
>work and typing. Also, it would make the interfaces (especially the event
>related ones) kinda worthless since you wouldn't be able to define the
>return type of the objects in the interfaces.
>
>We did all the work for the .addElement() method...if you want to do the
>work for all the event related stuff or whatever else, feel free and please
>submit the patches back. As it is now, I'm upset enough that someone else
>jump up to help out with the event stuff and Stephan and I had to do it on
>our own for you all. Gee thanks.
>
>Lastly, In Java 1.3, I believe that there are ways around this (ie: dynamic
>interfaces), but not in 1.2 or 1.1.
>
>-jon
>
>--
>Come to the first official Apache Software Foundation
>Conference! <http://ApacheCon.Com/>
>
>
>
>
>--
>------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Archives and Other: <http://java.apache.org/main/mail.html>
>Problems?: [EMAIL PROTECTED]
Zeljko Trogrlic
____________________________________________________________
@-solutions GmbH
Grillparzer Str. 14; D-81675 Muenchen
Tel.: 089/45 79 0-351; Fax.: 089/45 79 0-321
Email: mailto:[EMAIL PROTECTED] WWW: http://www.at-solutions.de
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]