commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Smith" <mich...@iammichael.org>
Subject RE: Collections 2.0? (Collections 1.1 RIP)
Date Wed, 20 Feb 2002 04:47:52 GMT
bayard@generationjava.com wrote:
> > > I suppose it wasn't explicitly stated though.  But I agree here.
> > > Collections should be based on the 1.2 Collection APIs.
> >
> > Agreed - I don't think it makes much sense to have 1.1
> support for a library
> > based on Java 2 collections. (Though with some Ant search &
> replace hacks we
> > could build a version of commons-collections that works on
> the Java 1.1
> > distro of Java 2 collections - but do we really need to go there?)
>
> My original question was not so much, do we support Collections in 1.2
> rather than 1.1, but do we ensure that all API interaction takes
> Iterator/List/Map rather than Enumeration/Vector/Hashtable?
>
> (Except for those components that are there to bridge, ie)
> EnumerationIterator).

Yes, I believe Iterator/List/Map/etc. should be used rather than
Enumeration/Vector/Dictionary in the collections API for the same
reasons.  If someone has an Enumeration and wants to call another
collections api, they just wrap the Enumeration in an
EnumerationIterator.  Hashtable and Vector already implement the
appropriate interface (Map and List), so that's not a problem.  And I
don't think we really need to care about someone that extends from
Dictionary.

regards,
michael



--
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