Displaying posts tagged with

“collections”

Dec
14
2009

When you can’t avoid an out parameter

We all know its a good idea to avoid using out variables in Java. In almost every case the code can be split up to avoid the situation. Its bad semantics because when reading the code its not obvious which object passed, if any will get mutated.  So the reader is forced to [...]

Oct
31
2009

Neat multiset in google collections API

This good thing was so small that I almost did not bother to blog it
But the devil is in the detail so here it is anyway.
I have this multi threaded application. One of the problems with integration testing it is, you can’t guarantee the order that messages will be written to a stream. [...]

Oct
27
2009

Refactoring to Google Collections – ImmutableList for simple code

Google collections are excellent in multi-threaded applications, so I thought I would re-factor some code to use them.