Hi Rich,

Thanks for the feed back. :)

On Thu, 22 May 2008 18:25:24 +0900, Rich Dougherty <[EMAIL PROTECTED]> wrote:

Hi Trustin

Wow, very comprehensive. I hope you wrote a code generator to write that
doc! :-)

Actually not, as you noticed. ;)

Here's some feedback on the javadoc. I know you asked for feedback on the
original interface, so apologies if some of this is a bit late.

1. In the doc for removeSlice(int) it currently says *This method differs
from removeSlice(int).* Should that be *This method differs from pollSlice()
*?

Fixed!

2. Instead of elementAsXxx(int index), how about getXxxAt(int index), or
something like that. To me, *elementAs* suggests that an element of the
Queue (i.e. a ByteBuffer) is being retrieved and converted to a different
type, when really we're getting a value from the bytes *within* a ByteBuffer
and converting it. Maybe I'm just being a bit pedantic about that one.

I thought the same. I think we can rename random access methods, just like List has get(int index).

3. Do you think it's worth adding a version of Collection.add() for
primitive types. i.e. a method that throws an exception if the primitive
can't be added? I can imagine that in a lot of cases it will be tiresome to
always check the return value of the offer methods to see if an operation
failed.

Ah.. I didn't even think about add(). Sounds like a good idea. Let me try to add them in the next check-in.

Cheers,

--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to