Loose-ends wrapup

Doug Lea dl at cs.oswego.edu
Fri May 10 13:00:32 PDT 2013

On 05/10/13 15:32, Kevin Bourrillion wrote:
> On Fri, May 10, 2013 at 11:09 AM, Doug Lea <dl at cs.oswego.edu
> <mailto:dl at cs.oswego.edu>> wrote:
>     It only supports the methods defined in the Collection API.
> Oh. I believe that severely curtails its usefulness, but could try to back that
> up with stats from Google's codebase if necessary.

Are you referring to the usages for which we decided to
recommend (pasting from javadoc...)

  * <p>A ConcurrentHashMap can be used as scalable frequency map (a
  * form of histogram or multiset) by using {@link
  * java.util.concurrent.atomic.LongAdder} values and initializing via
  * {@link #computeIfAbsent computeIfAbsent}. For example, to add a count
  * to a {@code ConcurrentHashMap<String,LongAdder> freqs}, you can use
  * {@code freqs.computeIfAbsent(k -> new LongAdder()).increment();}


More information about the lambda-libs-spec-observers mailing list