commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: [collections] New utility methods for CollectionUtils & ListUtils
Date Wed, 01 Feb 2006 14:10:31 GMT
Typically you move them one row at a time, though.  Correct?  For that you
can use java.util.Collections.swap().  The "move up" button just swaps the
currently selected row with the one above it.  And, it would be disabled if
it's the first item in the list.  I don't think I've ever implemented it so
that it rolls around to the bottom of the list as you mentioned. 

-----Original Message-----
From: Matt Blum [mailto:mblum42@gmail.com] 
Sent: Wednesday, February 01, 2006 8:36 AM
To: Jakarta Commons Developers List
Subject: Re: [collections] New utility methods for CollectionUtils &
ListUtils

Since the dependency in my deep-clone method is only on SerializationUtils,
and the clone method there just serializes and then deserializes the object
being cloned, it might be easiest to avoid the dependency by simply
re-implementing that functionality in my method.  What do you think?

As for the move method I mentioned, I don't think it's as specialized as
several have said.  I implemented it for a web application that stored the
rows in a data list in a List, and I had to make it possible for the user to
move a row up or down in the list.  I think this is, while not an eveyday
requirement, certainly common enough that inclusion of the method has some
merit.

-Matt

On 2/1/06, Torsten Curdt <tcurdt@apache.org> wrote:
>
>
> On 02.02.2006, at 00:06, Jörg Schaible wrote:
>
> > Torsten Curdt wrote on Wednesday, February 01, 2006 12:25 PM:
> >
> >>> This could be useful, but would need to be done without a
> >>> dependency on commons-lang.
> >>
> >> We already talked about that at the ApacheCon.
> >>
> >> Maybe it would useful to loosen such requirements by using tools like
> >> "minijar"
> >>
> >>   http://vafer.org/blog/tag/minijar
> >>
> >> or "proguard + jarjar"
> >>
> >>   http://proguard.sourceforge.net/
> >>   http://tonicsystems.com/products/jarjar/
> >>
> >> we add the dependency so we don't duplicate code but strip the
> >> unnecessary classes and inline the remaining.
> >>
> >> WDYT?
> >
> > Looking at proguard, this might be enough. Why do you think, jarjar
> > is also necessary ?
>
> Jarjar is better suited for the inlining. Unfortunately proguards
> configuration sucks quite bad and it require all transitive deps
> to be analyzed. Both are GPL btw.
>
> That's why I came up with minijar ...mainly for using it for jci.
>
> cheers
> --
> Torsten
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message