ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.174 by jsr166, Mon Feb 11 07:50:42 2013 UTC vs.
Revision 1.175 by jsr166, Mon Feb 11 08:37:44 2013 UTC

# Line 95 | Line 95 | import java.io.Serializable;
95   * <p>A ConcurrentHashMap can be used as scalable frequency map (a
96   * form of histogram or multiset) by using {@link
97   * java.util.concurrent.atomic.LongAdder} values and initializing via
98 < * {@link #computeIfAbsent}. For example, to add a count to a {@code
99 < * ConcurrentHashMap<String,LongAdder> freqs}, you can use {@code
100 < * freqs.computeIfAbsent(k -> new LongAdder()).increment();}
98 > * {@link #computeIfAbsent computeIfAbsent}. For example, to add a count
99 > * to a {@code ConcurrentHashMap<String,LongAdder> freqs}, you can use
100 > * {@code freqs.computeIfAbsent(k -> new LongAdder()).increment();}
101   *
102   * <p>This class and its views and iterators implement all of the
103   * <em>optional</em> methods of the {@link Map} and {@link Iterator}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines