ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/CustomConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/extra166y/CustomConcurrentHashMap.java (file contents):
Revision 1.32 by jsr166, Tue Feb 5 19:54:06 2013 UTC vs.
Revision 1.37 by jsr166, Sun Sep 13 16:28:13 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package extra166y;
8 +
9   import java.lang.ref.*;
10   import java.lang.reflect.*;
11   import java.io.*;
# Line 19 | Line 20 | import sun.misc.Unsafe;
20   * user-supplied computational methods for setting and updating
21   * values. In particular: <ul>
22   *
23 < *   <li> Identity-based, Equality-based or User-definable {@link
24 < *        Equivalence}-based comparisons controlling membership.
23 > *   <li>Identity-based, Equality-based or User-definable {@link
24 > *       Equivalence}-based comparisons controlling membership.
25   *
26 < *   <li> {@linkplain SoftReference Soft}, {@linkplain
27 < *        WeakReference weak} or strong (regular) keys and values.
26 > *   <li>{@linkplain SoftReference Soft}, {@linkplain
27 > *       WeakReference weak} or strong (regular) keys and values.
28   *
29 < *   <li> User-definable {@code MappingFunctions} that may be
30 < *        used in method {@link
31 < *        CustomConcurrentHashMap#computeIfAbsent} to atomically
32 < *        establish a computed value, along with
33 < *        {@code RemappingFunctions} that can be used in method
34 < *        {@link CustomConcurrentHashMap#compute} to atomically
35 < *        replace values.
29 > *   <li>User-definable {@code MappingFunctions} that may be
30 > *       used in method {@link
31 > *       CustomConcurrentHashMap#computeIfAbsent} to atomically
32 > *       establish a computed value, along with
33 > *       {@code RemappingFunctions} that can be used in method
34 > *       {@link CustomConcurrentHashMap#compute} to atomically
35 > *       replace values.
36   *
37 < *    <li>Factory methods returning specialized forms for {@code int}
38 < *        keys and/or values, that may be more space-efficient
37 > *   <li>Factory methods returning specialized forms for {@code int}
38 > *       keys and/or values, that may be more space-efficient
39   *
40   * </ul>
41   *
# Line 110 | Line 111 | import sun.misc.Unsafe;
111   * @param <K> the type of keys maintained by this map
112   * @param <V> the type of mapped values
113   */
114 < public class CustomConcurrentHashMap<K, V> extends AbstractMap<K, V>
115 <    implements ConcurrentMap<K, V>, Serializable {
114 > public class CustomConcurrentHashMap<K,V> extends AbstractMap<K,V>
115 >    implements ConcurrentMap<K,V>, Serializable {
116      private static final long serialVersionUID = 7249069246764182397L;
117  
118      /*
# Line 226 | Line 227 | public class CustomConcurrentHashMap<K,
227       * A function computing a mapping from the given key to a value,
228       * or {@code null} if there is no mapping.
229       */
230 <    public static interface MappingFunction<K, V> {
230 >    public static interface MappingFunction<K,V> {
231          /**
232           * Returns a value for the given key, or null if there is no
233           * mapping. If this function throws an (unchecked) exception,
# Line 247 | Line 248 | public class CustomConcurrentHashMap<K,
248       * current value to a new value, or {@code null} if there is
249       * no mapping.
250       */
251 <    public static interface RemappingFunction<K, V> {
251 >    public static interface RemappingFunction<K,V> {
252          /**
253           * Returns a new value for the given key and its current, or
254           * null if there is no mapping.
# Line 679 | Line 680 | public class CustomConcurrentHashMap<K,
680       * Returns {@code true} if this map contains a key equivalent to
681       * the given key with respect to this map's key Equivalence.
682       *
683 <     * @param  key   possible key
683 >     * @param  key possible key
684       * @return {@code true} if this map contains the specified key
685       * @throws NullPointerException if the specified key is null
686       */
# Line 697 | Line 698 | public class CustomConcurrentHashMap<K,
698       * key with respect to this map's key Equivalence, or {@code null}
699       * if no such mapping exists.
700       *
701 <     * @param  key   possible key
702 <     * @return the value associated with the key or {@code null} if
701 >     * @param  key possible key
702 >     * @return the value associated with the key, or {@code null} if
703       * there is no mapping
704       * @throws NullPointerException if the specified key is null
705       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines