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.59 by jsr166, Thu Apr 30 18:35:50 2015 UTC vs.
Revision 1.60 by jsr166, Thu Apr 30 18:47:12 2015 UTC

# Line 97 | Line 97 | public interface ConcurrentMap<K,V> exte
97  
98      /**
99       * If the specified key is not already associated
100 <     * with a value, associate it with the given value.
101 <     * This is equivalent to
100 >     * with a value, associates it with the given value.
101 >     * This is equivalent to, for this {@code map}:
102       * <pre> {@code
103       * if (!map.containsKey(key))
104       *   return map.put(key, value);
# Line 130 | Line 130 | public interface ConcurrentMap<K,V> exte
130  
131      /**
132       * Removes the entry for a key only if currently mapped to a given value.
133 <     * This is equivalent to
133 >     * This is equivalent to, for this {@code map}:
134       * <pre> {@code
135       * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
136       *   map.remove(key);
# Line 160 | Line 160 | public interface ConcurrentMap<K,V> exte
160  
161      /**
162       * Replaces the entry for a key only if currently mapped to a given value.
163 <     * This is equivalent to
163 >     * This is equivalent to, for this {@code map}:
164       * <pre> {@code
165       * if (map.containsKey(key) && Objects.equals(map.get(key), oldValue)) {
166       *   map.put(key, newValue);
# Line 191 | Line 191 | public interface ConcurrentMap<K,V> exte
191  
192      /**
193       * Replaces the entry for a key only if currently mapped to some value.
194 <     * This is equivalent to
194 >     * This is equivalent to, for this {@code map}:
195       * <pre> {@code
196       * if (map.containsKey(key)) {
197       *   return map.put(key, value);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines