How can I learn to use a collection of Java collections?

A strange name, I know, let me explain.

I am a developer most familiar with C # and Javascript. I am completely immersed in these semi-functional worlds to such an extent that most of my code is related to displaying / decreasing / filtering collections. In C #, this means that I use LINQ almost everywhere, in Javascript it is Underscore.js and jQuery.

I am currently assigned to the current Java project and am feeling rather depressed. I just don’t think in terms of "create an array, shuffle things from one to another." I can (and did) create my own versions of the basic map / reduce functions using anonymous types that implement interfaces, but why reinvent the wheel? The project I am in already has Commons-Collection-3.1.jar, and looking through the contained classes, it looks like it can do whatever I want and much more.

In my life I cannot find how to use it. Considering dozens of classes in it is not very useful, and the only thing I can do with google is the api doc , which is equally useful.

How do you use it to display / select, filter / where, decrease / aggregate? Is there anywhere that provides actual guidance on this library?

+5
source share
3 answers

(Comment as an answer for formatting purposes.)

Not many other than a limited user guide .

However, I'm not sure where exactly you are having problems - filtering and selection are mostly wrapped up in the functors package , and used by the CollectionUtils class .

, , Guava Lambda4J , ( Java), .

+4

@george-mauer, , , , this ​​, Jakarta Commons Cookbook. , .

+1

All Articles