2 ms·
Assuming you care about the distinction between null and no such key (for many applications you can avoid storing null, IMO), you can actually perform the conta
by loeg 13y ago
Assuming you care about the distinction between null and no such key (for many applications you can avoid storing null, IMO), you can actually perform the containsKey() after the get() for only keys which get() returns null. I think that see all of the perf overhead of a single lookup if most values are non-null.