commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject [collections] Primitive sub package
Date Wed, 08 Jan 2003 00:15:40 GMT
I've taken a look at the code added to the primitive package. It looks good
from my fairly quick scan reading. How do you feel about it though? Do you
reckon that the primitive only class plus object wrapper idea is the right
one now that you've actually got some code going in it? I guess the main
advantage is focussing peoples minds on the fact that they are primitive
lists and not losing the performance gain in boxing.

Some thoughts on what I have seen.
1) I noted the problem with the remove method needing to be split. I was
wondering if removeIndex might be a better name than removeElementAt? Not
sure...

2) Primitive collections will typically be based around an array, and so may
be bound (fixed size). For Objects, we have a BoundedCollection interface
that defines isFull() and maxSize(). Perhaps these should be methods on
IntCollection?  (We don't have to stick to the JDK spec ;-)

3) Similarly, one feature that people have requested in iterators is the
ability to reset them. So maybe IntIterator should have a reset() method
that resets it to the start again.

On a side note, the original primitive classes were never released, so there
is no absolute requirement to deprecate them. If its just temporary, before
removal in a few weeks thats fine, but I would oppose releasing new code
that is already deprecated!

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