I found the CollectionUtils class a year or so ago and a few of the methods like, collect, and transform seem really cool, however, I have yet to find ...
Before the introduction to generics to the Java language I would have written classes encapsulating collections-of-collections-of-collections. For example:
class Account {
private Map tradesByRegion; //KEY=Region, VALUE=TradeCollection
}
class TradeCollection {
...
One of my classes has a field which contains a Set. This field is only ever filled in the constructor, and then read by other classes. Originally I had something like ...
I have method List<Foo> getFoos () which gets the data from remote server and returns it.
Of course, user shouldn't change number of items of the list because he'll get data not ...
For example, in Jsoup, they defined a class Elements to collect Element(s).
It's common to define a class A and As which contains a lot of A(s). But why? Why ...
I need a single collection of "processor" classes (I happen to be using Java) that can operate on a concrete shape, say a circle. Some of the classes can operate ...
This issue has been bugging me for a while. Abstractly speaking, regardless of language, there are often situations when you want to have a method like this: