1146 |
|
} |
1147 |
|
|
1148 |
|
/** |
1149 |
< |
* Removes first entry; returns its key |
1150 |
< |
* @return null if empty or first key |
1149 |
> |
* Removes first entry; returns its key. |
1150 |
> |
* @return null if empty, else key of first entry |
1151 |
|
*/ |
1152 |
|
K doRemoveFirstKey() { |
1153 |
|
for (;;) { |
1175 |
|
|
1176 |
|
/** |
1177 |
|
* Removes first entry; returns its snapshot. |
1178 |
< |
* @return null if empty, else key,value entry |
1178 |
> |
* @return null if empty, else snapshot of first entry |
1179 |
|
*/ |
1180 |
|
Map.Entry<K,V> doRemoveFirstEntry() { |
1181 |
|
for (;;) { |
1198 |
|
clearIndexToFirst(); |
1199 |
|
K key = n.key; |
1200 |
|
return new AbstractMap.SimpleImmutableEntry<K,V>(key, (V)v); |
1201 |
< |
} |
1201 |
> |
} |
1202 |
|
} |
1203 |
|
|
1204 |
|
/** |
1465 |
|
return null; |
1466 |
|
K k = n.key; |
1467 |
|
V v = n.getValidValue(); |
1468 |
< |
if (v != null) |
1468 |
> |
if (v != null) |
1469 |
|
return k; |
1470 |
|
} |
1471 |
|
} |
1497 |
|
return null; |
1498 |
|
K k = n.key; |
1499 |
|
V v = n.getValidValue(); |
1500 |
< |
if (v != null) |
1500 |
> |
if (v != null) |
1501 |
|
return new AbstractMap.SimpleImmutableEntry<K,V>(k, v); |
1502 |
|
} |
1503 |
|
} |
1517 |
|
if (fence != null && compare(k, fence) >= 0) |
1518 |
|
return null; |
1519 |
|
V v = doRemove(k, null); |
1520 |
< |
if (v != null) |
1520 |
> |
if (v != null) |
1521 |
|
return new AbstractMap.SimpleImmutableEntry<K,V>(k, v); |
1522 |
|
} |
1523 |
|
} |
1537 |
|
if (least != null && compare(k, least) < 0) |
1538 |
|
return null; |
1539 |
|
V v = doRemove(k, null); |
1540 |
< |
if (v != null) |
1540 |
> |
if (v != null) |
1541 |
|
return new AbstractMap.SimpleImmutableEntry<K,V>(k, v); |
1542 |
|
} |
1543 |
|
} |
2806 |
|
public void clear() { |
2807 |
|
ConcurrentSkipListMap.this.clear(); |
2808 |
|
} |
2809 |
– |
|
2809 |
|
public Object[] toArray() { |
2810 |
|
Collection<K> c = new ArrayList<K>(); |
2811 |
|
for (Iterator<K> i = iterator(); i.hasNext(); ) |
2883 |
|
public void clear() { |
2884 |
|
ConcurrentSkipListMap.this.clear(); |
2885 |
|
} |
2887 |
– |
|
2886 |
|
public Object[] toArray() { |
2887 |
|
Collection<Map.Entry<K,V>> c = new ArrayList<Map.Entry<K,V>>(); |
2888 |
|
for (Map.Entry<K,V> e : this) |