On Thu, Jun 13, 2019 at 8:32 AM sebb <seb...@gmail.com> wrote:

> On Wed, 12 Jun 2019 at 22:11, Mark Dacek <m...@syberion.com> wrote:
> >
> > I’d support adding both.
>
> +1
>
> How about overloading as follows:
>
> ArrayUtils.add(T[], T, index)
>
> It seems inconsistent to have add() and addFirst(); that suggests
> there should be an addLast()
>

Indeed, the current add() is your suggested addLast(). Would you deprecate
add() in favor of a new addLast() as I think we still want a short hand
method for "add first".

Gary


> > On Wed, Jun 12, 2019 at 5:09 PM James Carman <ja...@carmanconsulting.com
> >
> > wrote:
> >
> > > I like it.  Seems like a logical thing to do.  Another idea would be
> adding
> > > at an arbitrary index.
> > >
> > > On Wed, Jun 12, 2019 at 5:04 PM Gary Gregory <garydgreg...@gmail.com>
> > > wrote:
> > >
> > > > Hi All:
> > > >
> > > > We have org.apache.commons.lang3.ArrayUtils.add(T[], T).
> > > >
> > > > WDYT about adding a method that adds the element at the beginning of
> the
> > > > new array instead of the end?
> > > >
> > > > Gary
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to