commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject Buffer naming (was RE: [Commons-Avalon:collections] code integration)
Date Thu, 20 Jun 2002 18:08:17 GMT
> From: Jack, Paul [mailto:pjack@sfaf.org] 
> 
> > It looks like most of collections was already copied over
> > some time ago
> > (just over a year ago).  The only things missing are the 
> > Buffer classes
> > and the BucketMap.
> 
> I actually have a few issues with the Buffer interface...
> 
> 1.  Shouldn't it be named Queue?  I mean, isn't that what it 
> is?  A data structure in which elements are added to the end 
> and removed from the beginning?  I only care because the 
> buffer class name collides with java.nio.Buffer.

History of buffer:

* Written pre-JDK 1.4, so there was no name clash.

Future of buffer:

The more I think about it, I don't like calling it Queue.
Esp. if we decide to donate the Event package to Commons.
You would have *more* confusion regarding multipl Apache
Queue objects than there would be between an Apache Buffer
and a java.nio.Buffer.


For example, can you tell at first glance which Queue
allows a PreparedQueue?

org.apache.collections.Queue
org.apache.event.Queue

Now, can you tell which one extends java.util.Collection?

org.apache.collections.Buffer
java.nio.Buffer


I think there would be actually less confusion regarding
the name Buffer than there would be with the name Queue.


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