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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentMap.java (file contents):
Revision 1.15 by dl, Wed Dec 3 21:07:44 2003 UTC vs.
Revision 1.16 by dl, Sat Dec 6 00:16:20 2003 UTC

# Line 93 | Line 93 | public interface ConcurrentMap<K, V> ext
93       * Acts as
94       * <pre>
95       *  if ((map.containsKey(key)) {
96 <     *     map.put(key, value);
97 <     *     return true;
98 <     * } else return false;
96 >     *     return map.put(key, value);
97 >     * } else return null;
98       * </pre>
99       * except that the action is performed atomically.
100       * @param key key with which the specified value is associated.
101       * @param value value to be associated with the specified key.
102 <     * @return true if the value was replaced
102 >     * @return previous value associated with specified key, or <tt>null</tt>
103 >     *         if there was no mapping for key.  A <tt>null</tt> return can
104 >     *         also indicate that the map previously associated <tt>null</tt>
105 >     *         with the specified key, if the implementation supports
106 >     *         <tt>null</tt> values.
107       * @throws NullPointerException if this map does not permit <tt>null</tt>
108       *            keys or values, and the specified key or value is
109       *            <tt>null</tt>.
110       */
111 <    boolean replace(K key, V value);
111 >    V replace(K key, V value);
112  
113   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines