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

Comparing jsr166/src/jdk7/java/util/concurrent/ConcurrentMap.java (file contents):
Revision 1.1 by dl, Sun Dec 16 20:55:15 2012 UTC vs.
Revision 1.4 by jsr166, Sun Jan 18 20:17:32 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package java.util.concurrent;
8 +
9   import java.util.Map;
10  
11   /**
12   * A {@link java.util.Map} providing additional atomic
13 < * <tt>putIfAbsent</tt>, <tt>remove</tt>, and <tt>replace</tt> methods.
13 > * {@code putIfAbsent}, {@code remove}, and {@code replace} methods.
14   *
15   * <p>Memory consistency effects: As with other concurrent
16   * collections, actions in a thread prior to placing an object into a
# Line 27 | Line 28 | import java.util.Map;
28   * @param <K> the type of keys maintained by this map
29   * @param <V> the type of mapped values
30   */
31 < public interface ConcurrentMap<K, V> extends Map<K, V> {
31 > public interface ConcurrentMap<K,V> extends Map<K,V> {
32      /**
33       * If the specified key is not already associated
34       * with a value, associate it with the given value.
# Line 43 | Line 44 | public interface ConcurrentMap<K, V> ext
44       * @param key key with which the specified value is to be associated
45       * @param value value to be associated with the specified key
46       * @return the previous value associated with the specified key, or
47 <     *         <tt>null</tt> if there was no mapping for the key.
48 <     *         (A <tt>null</tt> return can also indicate that the map
49 <     *         previously associated <tt>null</tt> with the key,
47 >     *         {@code null} if there was no mapping for the key.
48 >     *         (A {@code null} return can also indicate that the map
49 >     *         previously associated {@code null} with the key,
50       *         if the implementation supports null values.)
51 <     * @throws UnsupportedOperationException if the <tt>put</tt> operation
51 >     * @throws UnsupportedOperationException if the {@code put} operation
52       *         is not supported by this map
53       * @throws ClassCastException if the class of the specified key or value
54       *         prevents it from being stored in this map
# Line 72 | Line 73 | public interface ConcurrentMap<K, V> ext
73       *
74       * @param key key with which the specified value is associated
75       * @param value value expected to be associated with the specified key
76 <     * @return <tt>true</tt> if the value was removed
77 <     * @throws UnsupportedOperationException if the <tt>remove</tt> operation
76 >     * @return {@code true} if the value was removed
77 >     * @throws UnsupportedOperationException if the {@code remove} operation
78       *         is not supported by this map
79       * @throws ClassCastException if the key or value is of an inappropriate
80       *         type for this map
# Line 99 | Line 100 | public interface ConcurrentMap<K, V> ext
100       * @param key key with which the specified value is associated
101       * @param oldValue value expected to be associated with the specified key
102       * @param newValue value to be associated with the specified key
103 <     * @return <tt>true</tt> if the value was replaced
104 <     * @throws UnsupportedOperationException if the <tt>put</tt> operation
103 >     * @return {@code true} if the value was replaced
104 >     * @throws UnsupportedOperationException if the {@code put} operation
105       *         is not supported by this map
106       * @throws ClassCastException if the class of a specified key or value
107       *         prevents it from being stored in this map
# Line 125 | Line 126 | public interface ConcurrentMap<K, V> ext
126       * @param key key with which the specified value is associated
127       * @param value value to be associated with the specified key
128       * @return the previous value associated with the specified key, or
129 <     *         <tt>null</tt> if there was no mapping for the key.
130 <     *         (A <tt>null</tt> return can also indicate that the map
131 <     *         previously associated <tt>null</tt> with the key,
129 >     *         {@code null} if there was no mapping for the key.
130 >     *         (A {@code null} return can also indicate that the map
131 >     *         previously associated {@code null} with the key,
132       *         if the implementation supports null values.)
133 <     * @throws UnsupportedOperationException if the <tt>put</tt> operation
133 >     * @throws UnsupportedOperationException if the {@code put} operation
134       *         is not supported by this map
135       * @throws ClassCastException if the class of the specified key or value
136       *         prevents it from being stored in this map

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines