[collections] suggestion for improvement: QueryableCollections

2012-01-15 Thread Benedikt Ritter
Hi, I have written a small extension for java.util.ArrayList, that allows for qerrying Lists using (generic) predicates. In addition to that, I adapted org.springframework.data.jpa.domain.Specifications class as a util to link predicates to queries. Here is how it works: QueryableList qList

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-15 Thread James Ring
Google Guava has all this and more, and it doesn't require an extension to ArrayList, any Iterable will do. http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Iterables.html On Jan 15, 2012 3:59 AM, "Benedikt Ritter" wrote: > Hi, > > I have written a small exten

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-16 Thread Benedikt Ritter
Am 15.01.2012 20:23, schrieb James Ring: Google Guava has all this and more, and it doesn't require an extension to ArrayList, any Iterable will do. http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Iterables.html Hi James, thanks for the response! I agree w

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-16 Thread Benedikt Ritter
Am 16.01.2012 12:00, schrieb Benedikt Ritter: Am 15.01.2012 20:23, schrieb James Ring: Google Guava has all this and more, and it doesn't require an extension to ArrayList, any Iterable will do. http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Iterables.html

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-16 Thread James Ring
I agree, I'm just saying you should seriously study the design of those interfaces before you embark on a project like this. Adding a new API to a library like collections imposes a burden on maintainers that far outweighs the initial cost of the implementation. You should make sure the API is wor

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-16 Thread Matt Benson
Also, if you're interested in predicate-based APIs for filtering Iterables, check out the FilteredIterable class in Commons' unreleased [functor] component. Matt On Mon, Jan 16, 2012 at 9:50 AM, James Ring wrote: > I agree, I'm just saying you should seriously study the design of those > interfa

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-16 Thread Benedikt Ritter
Am 16.01.2012 17:11, schrieb Matt Benson: Also, if you're interested in predicate-based APIs for filtering Iterables, check out the FilteredIterable class in Commons' unreleased [functor] component. Matt I had an interesting discussion about commons collections next release with Christian Gro

Re: [collections] suggestion for improvement: QueryableCollections

2012-01-18 Thread Benedikt Ritter
Am 16.01.2012 16:50, schrieb James Ring: I agree, I'm just saying you should seriously study the design of those interfaces before you embark on a project like this. Adding a new API to a library like collections imposes a burden on maintainers that far outweighs the initial cost of the implemen