3 ms·
Adding to the OP: Immutable collections, e.g. ImmutableMap.of(key, value). These tend to be faster than their mutable counterparts. MapMaker - really handy fo
by nvarsj 15y ago
Adding to the OP:
Immutable collections, e.g. ImmutableMap.of(key, value). These tend to be faster than their mutable counterparts.
MapMaker - really handy for building caches and computing maps. Possibly the most useful thing in guava for simplifying non-trivial Java programs.
Suppliers#memoize - lazy loading without the ugly DCL code that usually goes with it.
Good libraries make a language much more enjoyable to work in. Thanks Google!