This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I would like to do the Object Calisthenics exercise, which requires writing a thousand-line Java application in strict compliance with nine rules. Rule Four is this:
First class collections Application of this rule is simple: any class that contains a collection should contain no other member variables. Each collection gets wrapped in its own class, so now behaviors related to the collection have a home. You may find that filters become a part of this new class. Also, your new class can handle activities like joining two groups together or applying a rule to each element of the group.
The body of the rule is easy enough to understand ("any class that contains a collection should contain no other member variables"), but what does "First Class collections" mean? Of course I've searched on this phrase, but most of what I'm finding seems to trace back to the Object Calisthenics exercise in some way, or to one of those questions you tend to find on stackoverflow that somehow goes kind of viral and ends up being repeated on a hundred different sites (probably because no one was able to answer it to the OP's satisfaction).
Wikipedia offers some help, but it doesn't really seem to relate to the body of the rule as written above.
I don't think it means anything in Java. It's probably a term devised by the Object Calisthenics author. Or perhaps someone else. But regardless, there's no standard understanding of what the term is supposed to mean. Not in the mainstream Java community, anyway.