ACMNexus / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

MapMaker should really be called ConcurrentMapBuilder #171

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The javadoc begins

A ConcurrentMap builder, providing any combination of these features: soft
or weak keys, soft or weak values, timed expiration, and on-demand
computation of values.

Why not call it ConcurrentMapBuilder then?

makeMap()
makeComputingMap(com.google.common.base.Function)

should also be refactored to buildMap() and buildComputingMap(Function)
accordingly.

Original issue reported on code.google.com by heue...@gmail.com on 18 May 2009 at 5:53

GoogleCodeExporter commented 8 years ago
One potential confusion is that classes like ImmutableMap.Builder are about 
choosing
which entries go in the map, not how it's implemented.  Someone who has 
absorbed this
convention might assume that a "ConcurrentMapBuilder" just lets you prepopulate 
a
ConcurrentMap, whereas it's more or less a ConcurrentMapImplementationBuilder.

I can't claim that "MapMaker" gets across the full capabilities of the class, 
but I
do think the difference from "MapBuilder" at least hints at the difference in
capabilities.

Original comment by cpov...@google.com on 18 May 2009 at 6:21

GoogleCodeExporter commented 8 years ago
You are right, it should be called ConcurrentMapImplementationBuilder.  That's 
a bit
of a mouthfull.

Perhaps the other builders should be called Populators?

Feel free to mark as [WontFix].

Original comment by heue...@gmail.com on 19 May 2009 at 5:10

GoogleCodeExporter commented 8 years ago
Plus, we just like the name MapMaker. :)

When something like MapMaker gets in the JDK it will have a very different name,
probably more like what you are expecting.  But our version of it will still be 
MapMaker.

Original comment by kevin...@gmail.com on 19 May 2009 at 9:48