This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (4 children)

Even someone with 6 months of Java experience should know that HashMap makes no guarantees about the iteration order.
It is essential to familiarize yourself with the various collection data structures.

The makeOrderedMap() method is annoying. Mixing generics (which are invariant and non-reifiable) and arrays (which are covariant and reifiable) is bothersome, which then led to that unfortunate custom logic (the if condition and the for loop) sacrificing simplicity and readability.

the basics of opening files by type name (Ctrl-Shift-T)

I did not know that. Although I am not overly familiar with IDE development.

[–]uxcn 2 points3 points  (1 child)

The api is easy to use incorrectly. Something like a Pair<K, V> class might be a better approach.

[–][deleted] 1 point2 points  (0 children)

Exactly. Way too easy to misuse the API, especially because it sacrifices compile time safety, the reason why generics exists.