On Thu, Jun 13, 2019 at 8:32 AM sebb <[email protected]> wrote:

> On Wed, 12 Jun 2019 at 22:11, Mark Dacek <[email protected]> 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 <[email protected]
> >
> > 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 <[email protected]>
> > > 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to