Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 94381 invoked from network); 28 Oct 2003 07:11:42 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Oct 2003 07:11:42 -0000 Received: (qmail 92222 invoked by uid 500); 28 Oct 2003 07:11:15 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 92182 invoked by uid 500); 28 Oct 2003 07:11:15 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 92125 invoked from network); 28 Oct 2003 07:11:15 -0000 Received: from unknown (HELO atlanta.seagullsw.com) (12.6.96.143) by daedalus.apache.org with SMTP; 28 Oct 2003 07:11:15 -0000 Received: by atlanta.seagullsw.com with Internet Mail Service (5.5.2656.59) id ; Tue, 28 Oct 2003 02:11:20 -0500 Message-ID: <245A7290F0E0D311BF6E009027E7908B072048EE@atlanta.seagullsw.com> From: Gary Gregory To: 'Jakarta Commons Developers List' Subject: RE: [collections] New class EnumerationUtils? Date: Tue, 28 Oct 2003 02:11:20 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C39D22.AFD50CD0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C39D22.AFD50CD0 Content-Type: text/plain I'll go ahead a store a "starter" EnumerationUtils class tomorrow. As far as Sun goes, I wonder if they did do that internally and got some "now my pretty code has compile warnings all over the place" feedback. Or perhaps Sun feels "self-deprecation" is too much of an admission of guilt WRT now not so great design choices... Not marking these deprecated can't make Java any easier to teach, that's certain. Gary > -----Original Message----- > From: __matthewHawthorne [mailto:matth@phreaker.net] > Sent: Monday, October 27, 2003 19:50 > To: Jakarta Commons Developers List > Subject: Re: [collections] New class EnumerationUtils? > > As you've pointed out, since there are already a few classes for working > with Enumerations, I don't think it's such a bad idea to create > EnumerationUtils in order to suit your needs. I say +1, go for it. > > Sometimes I wonder why Sun never deprecated Hashtable, Vector, and > Enumeration... this "unofficial deprecation" thing doesn't make sense to > me. > > > > > David Graham wrote: > > --- Gary Gregory wrote: > > > >>The 2.1 Enumeration classes are: > >> > >>org.apache.commons.collections.iterators.EnumerationIterator > >> Adapter to make Enumeration instances appear to be Iterator > >>instances. > >> > >>org.apache.commons.collections.iterators.IteratorEnumeration > >> Adapter to make an Iterator instance appear to be an Enumeration > >>instance. > >> > >>So perhaps the "anti Enumeration" stance is more feeling than policy ;-) > >> > >>It seems that in a lot of cases, Enumerations enumerate over collection > >>types of things as in ResourceBundle.getKeys() for example. > >> > >>Which is why (to me) an EnumerationUtils class seems at home here. > >> > >>More thoughts? > > > > > > Unfortunately, even though the dreaded Enumeration interface has been > > unofficially deprecated, important APIs like Servlet depend on it. I > > think anything that makes it easier to to deal with these legacy > > Enumerations is a good thing. > > > > David > > > > > >>Gary > >> > >> > >>>-----Original Message----- > >>>From: Stephen Colebourne [mailto:scolebourne@btopenworld.com] > >>>Sent: Monday, October 27, 2003 11:56 > >>>To: Jakarta Commons Developers List > >>>Subject: Re: [collections] New class EnumerationUtils? > >>> > >>>Yes, we are pretty much anti Enumeration. There are some methods here > >> > >>and > >> > >>>there though. > >>>Stephen > >>> > >>>----- Original Message ----- > >>>From: "__matthewHawthorne" > >>>To: "Jakarta Commons Developers List" > >>>Sent: Monday, October 27, 2003 7:36 PM > >>>Subject: Re: [collections] New class EnumerationUtils? > >>> > >>> > >>> > >>>>The only problem is that Enumerations aren't really a part of the > >>>>collections framework. Of course, this is just a technicality... > >> > >>but it > >> > >>>>may be the reason that a EnumerationUtils class hasn't been created. > >>>> > >>>>Cany anyone else confirm this? > >>>> > >>>> > >>>> > >>>> > >>>>Gary Gregory wrote: > >>>> > >>>>>Hello, > >>>>> > >>>>>In 2.1, I have code like: > >>>>> > >>>>>java.util.ResourceBundle resourceBundle = ... > >>>>>List keysList = IteratorUtils.toList(new > >>>>>EnumerationIterator(resourceBundle.getKeys())); > >>>>> > >>>>>Do we want an EnumerationUtils class, which, for now (a la XP) > >> > >>would > >> > >>>have a > >>> > >>>>>toList() method and grow from there? > >>>>> > >>>>>Thanks, > >>>>>Gary > >>>>> > >>>> > >>>> > >>>> > >>--------------------------------------------------------------------- > >> > >>>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > >>>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org > >>>> > >>> > >>> > >>>--------------------------------------------------------------------- > >>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > >>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org > >> > > > > > > __________________________________ > > Do you Yahoo!? > > Exclusive Video Premiere - Britney Spears > > http://launch.yahoo.com/promos/britneyspears/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org ------_=_NextPart_001_01C39D22.AFD50CD0--