thanks John, Functional Java looks closest to what I'm after since it stays
closest to the current Collections metaphors, cheers!

I'd love to take the time to dig into the commons & Google functional stuff,
but just don't have time at the moment with the workload to play with all
three... :-(

2009/3/16 Frederic Simon <frederic.si...@gmail.com>

> "the Google Collections API doesn't seem to have much closure-y goodness
> either."
> Strange to me. The Function and Predicate of google collections are quite
> good for me.
> Looking at
> http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Iterables.html
> it provides much more than each!
>
> On Sun, Mar 15, 2009 at 4:38 PM, Matthew Kerle <mattke...@gmail.com>wrote:
>
>> Hi all,
>>
>> I've been thinking lately that I'd like to try out collection-style
>> closures in Java, albeit as best as we can do with inner-classes. What I'd
>> like to end up is generic versions of Map & List that are exactly the same,
>> but *also* have methods like list.forEach(...), list.filter(....),
>> list.anySatisfy(....) where the ... is a inner class that extends an
>> interface or abstract class which the list or map knows how do iterate over
>> and do the semantically meaningfull thing with.
>>
>> Basically I want to be able to work with collections without having to
>> write for( : ) loops, while( ) loops or even look at Iterators, I want to be
>> able to write predicates that the list is smart enough to work with, but
>> still have all the normal list & map functions available without too many
>> helper objects or static calls around.
>>
>> My question is, before I go spending time I don't have on writing my own,
>> does anyone know of a good collection API(s) in Java that already does this?
>>
>> I've had a poke around and found this guy with a pimped foreach 
>> loop<http://www.iam.unibe.ch/%7Eakuhn/blog/2008/pimp-my-foreach-loop/>,
>> but I don't like his syntax because he still uses an explicit loop, not to
>> mention the magic static calls. I also had a quick poke around in apache
>> commons-collections (we're currently using 2.1.1 and the closure interface
>> there looks a bit lonely, 3.2 seems to have lots more goodness but from what
>> I've seen the syntax there is very closure-y, but not quite what I'm looking
>> for from what I've seen ) and the Google Collections API doesn't seem to
>> have much closure-y goodness either.
>>
>> any ideas anyone? Should I just write it myself or try to work with
>> commons-collections?
>>
>> cheers!
>>
>> matt.
>>
>>
>>
>
>
> --
> http://www.jfrog.org/
> http://freddy33.blogspot.com/
> http://nothingisinfinite.blogspot.com/
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to