Go for it ;-)
Stephen

----- Original Message -----
From: "Neil O'Toole" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Friday, December 06, 2002 9:51 PM
Subject: Re: [collections] private member access in
o.a.c.collections.iterators


>
> I've prepared a patch for ArrayIterator, and the ArrayListIterator
> class is ready to go, with associated test cases. However, there is
> another issue with ArrayIterator. The ArrayIterator(Object array, int
> start, int end) constructor has the following test:
>
>         if(end <= start) {
>             throw new IllegalArgumentException(
>
> My understanding is that this should really be changed to:
>
>         if(end < start) {
>
> The current behaviour prohibits the creation of an iterator over a
> zero-length section of array, even though this is a valid thing to do.
> Unless there are objections, I will also include this change in the
> patch. This will also require changes to TestArrayList, so I guess I
> can create a patch for this as well.
>
> Any comments?
>
> - Neil
>
>
> --- Stephen Colebourne <[EMAIL PROTECTED]> wrote:
> > Perhaps you would like to send a patch for ArrayIterator.
> > http://jakarta.apache.org/site/source.html#Patches
> >
> > Also, an ArrayListIterator would be very welcome for the iterators
> > package.
> > If you are writing it, perhaps you would consider submitting it
> > together
> > with the associated patch to IteratorUtils?
> >
> > Thanks
> > Stephen
> >
> > ----- Original Message -----
> > From: "Neil O'Toole" <[EMAIL PROTECTED]>
> > > I've been using the o.a.c.collections packages for a few months,
> > and I
> > > want to applaud you guys for some fantastic work.
> > >
> > > I do have a question: forgive me if this has been discussed before
> > > (though I couldn't find it in the mail archive), but is there a
> > > particular reason why the member variables in the
> > > o.a.c.collections.iterators classes are private instead of being
> > > protected? In general, why would you want to do this, as it
> > prevents
> > > subclassing? A particular case: I wanted to created an
> > > ArrayListIterator that subclasses ArrayIterator and implements the
> > > ListIterator interface. With protected member access it is a simple
> > and
> > > elegant implementation to subclass ArrayIterator.
> > >
> > > Thoughts on the matter?
> > >
> > > - Neil O'Toole
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to