NOTE: a new version of this cheatsheet is available here.
Hello,
As I said in my previous post, I currently read this great book (not expensive and few hours to read it):
The second part describes the collections in details: I really recommend you to buy it if you want to understand how they are implemented. For my every day work, I would like to get a cheatsheet which summarizes available collections and their performance.
So, here is a first version of my cheatsheet, I hope someone else thinks it’s useful too.
I don’t think it’s perfect : I still have conversion problem that I can’t solve. It seems that the quality of the PDF file is poor
.
Please leave me a comment if you have remarks. In your opinion, do you think it is a friendly cheatsheet?


Comments 16
Probably the most important poster anyone could put up in an office. It’s scary how many resort to ArrayList no matter the task.
Posted 13 May 2009 at 8:59 am ¶Very helpful especially the complexity information to select the most appropriate container. Well done
Posted 13 May 2009 at 10:32 am ¶Thank you for your comments. Yes, I think it’s nice and the quality of the PDF doesn’t seem to be a problem. I have to mention that the complexities are given in the book: I’m sure it’s useful in our work. But it’s just a cheatsheet, I don’t think it’s enough to get the complexities, developers have to know how the collections work internally. I have learnt many things with the book.
Posted 13 May 2009 at 7:49 pm ¶Well done!
Posted 14 May 2009 at 11:23 am ¶nice
Posted 14 May 2009 at 7:02 pm ¶I’m glad that you found the book so useful, and thank you very much for putting the collections material into such an accessible form!
Posted 15 May 2009 at 7:01 pm ¶Hello Maurice Naftalin,
.
Posted 17 May 2009 at 10:54 pm ¶I’m pleased to see your comment. I’m impressed that one of the authors of the book find my little blog
And so, yes, I think your book is really good: good approach and good style.
I’m happy that you appreciate this cheatsheet.
Coderfriendly
Very good summary and pdf is ok.
Posted 21 May 2009 at 9:35 pm ¶I couldn’t find something to change, almost.
Perhaps, a 1 line reminder can be added to compare O(1), O(n) and O(log n) for those which have forgotten mathematics.
And perhaps, Collections could be noted as “utility class”: it is not a “collection class” but more useful than others for me.
Thanks. It’s great!
Posted 24 May 2009 at 1:42 pm ¶I was curious if you also have a x/y matrix for details of each collection for instance HashMap’s iteration properties or ArrayList’s method list… just a grid that has x’s for every attribute – this could be page 3 of your 2 page guide
thx
Posted 16 Jul 2009 at 9:46 pm ¶Hello Aaron,
I’m sorry but I don’t know what a x/y matrix is. Can you give me more details?
Thank you.
Posted 19 Jul 2009 at 4:05 pm ¶Coderfriendly
what I mean by x/y matrix is a simple orthographic table which lists all collections by name on the left of the list and then along the bottom you would feature all potential characteristics of any collection be it interface generics or extending characteristic… then in the grid itself it is simply denoted/marked if that particular trait is possessed by the type of collection indicated on that row/line.
does that make sense ?
Posted 20 Jul 2009 at 2:40 pm ¶Aaron,
I think I have understood. For sample, a column title would be “sorted” or “unique values”, etc. So, this matrix would be useful when we’re looking for a specific behavior and that we try to find which collection to use. Am I right?
During this summer, I don’t spend too much time on writing my blog (the sun is more attractive
. I note your request and I’ll come back on it soon. Maybe, have you already this kind of matrix? If it is the case, you can send it to me (coderfriendly@yahoo.com) -> scanned version is okay.
Thank you for your feedback and I hope I will have time to fulfill your request soon.
Coderfriendly
Posted 21 Jul 2009 at 1:21 pm ¶really appreciate this! saves a lot of time:)
Posted 07 Aug 2010 at 7:36 pm ¶Thanks for the wonderful cheatsheet !!
Posted 13 Sep 2010 at 6:27 pm ¶thanks alot
Posted 09 Jun 2011 at 1:01 pm ¶Post a Comment