effective-java-3e-source-code
effective-java-3e-source-code copied to clipboard
confusing language about "EnumMap version" in Item 37
in item 37 on page 173, the second paragraph talks about "an EnumMap version and two stream-based versions". This is confusing and misleading because the second of the two "stream versions" also happens to use EnumMap, i.e. it's a combination of EnumMap and stream. What the book calls "the EnumMap version" probably refers to the one on 172, which uses only EnumMap and not stream.
Hence, instead of "EnumMap version", the book should probably say "non-stream EnumMap version". You could argue that juxtaposing "EnumMap version" next to "stream-based" automatically implies that the former is non-stream, but I feel like that's still somewhat misleading and made me do a distracted double-take.