commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@btopenworld.com
Subject Re: [collections] [PATCH] Adding singleton List, Set & Map
Date Fri, 06 Sep 2002 15:17:28 GMT
>  from:    "Michael A. Smith" <mas@apache.org>
>  > You know my view on this already...I would like to see our API
>  > provide methods that forward to the JDK methods as appropriate (or
>  > provide implementations for 1.2). As has been said before IIRC, if
>  > the JDK Collections class had a non-private constructor we probably
>  > would have subclassed it.
> 
> Still, how would you want to deal with a method that was added in 1.3? 
> We wouldn't be able to just forward the method call on because the 
> method will not exist in the 1.2 environment.  Additionally, users of 
> 1.2 wouldn't have access to those methods added in 1.3, so it's not 
> necessarily duplicating that functionality provided by sun in the 1.2 
> release.

I would check the version of Java we have, if 1.3 then call Collections, else use our version.
The Collections version might have optimisations because of package scope, so this is preferable
to just replacing the JDK routine in all circumstances.

Stephen



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message