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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentSkipListMap.java (file contents):
Revision 1.29 by jsr166, Sat May 28 15:09:37 2005 UTC vs.
Revision 1.30 by dl, Sun May 29 14:02:26 2005 UTC

# Line 1149 | Line 1149 | public class ConcurrentSkipListMap<K,V>
1149       * Removes first entry; returns its key.
1150       * @return null if empty, else key of first entry
1151       */
1152 <    K doRemoveFirstKey() {
1152 >    K pollFirstKey() {
1153          for (;;) {
1154              Node<K,V> b = head.node;
1155              Node<K,V> n = b.next;
# Line 1168 | Line 1168 | public class ConcurrentSkipListMap<K,V>
1168              if (!n.appendMarker(f) || !b.casNext(n, f))
1169                  findFirst(); // retry
1170              clearIndexToFirst();
1171 <            K key = n.key;
1172 <            return key;
1171 >            return n.key;
1172          }
1173      }
1174  
# Line 1196 | Line 1195 | public class ConcurrentSkipListMap<K,V>
1195              if (!n.appendMarker(f) || !b.casNext(n, f))
1196                  findFirst(); // retry
1197              clearIndexToFirst();
1198 <            K key = n.key;
1200 <            return new AbstractMap.SimpleImmutableEntry<K,V>(key, (V)v);
1198 >            return new AbstractMap.SimpleImmutableEntry<K,V>(n.key, (V)v);
1199          }
1200      }
1201  
# Line 1221 | Line 1219 | public class ConcurrentSkipListMap<K,V>
1219          }
1220      }
1221  
1224    /**
1225     * Removes first entry; returns key or null if empty.
1226     */
1227    K pollFirstKey() {
1228        return doRemoveFirstKey();
1229    }
1222  
1223      /* ---------------- Finding and removing last element -------------- */
1224  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines