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.5 by dl, Sat Jul 19 15:36:22 2003 UTC vs.
Revision 1.6 by dl, Fri Aug 1 22:40:05 2003 UTC

# Line 9 | Line 9 | import java.util.Map;
9  
10   /**
11   * A {@link java.util.Map} providing an additional atomic
12 < * <tt>putIfAbsent</tt> method.
12 > * <tt>putIfAbsent</tt> and <tt>remove</tt> methods.
13   * @since 1.5
14   * @author Doug Lea
15   */
# Line 45 | Line 45 | public interface ConcurrentMap<K, V> ext
45       *
46       **/
47      V putIfAbsent(K key, V value);
48 +
49 +    /**
50 +     * Remove entry for key only if currently mapped to given value.
51 +     * Acts as
52 +     * <pre>
53 +     *  if (map.get(key) == value) map.remove(key);
54 +     * </pre>
55 +     * except that the action is performed atomically.
56 +     */
57 +    boolean remove(K key, V value);
58 +
59   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines