594 |
|
|
595 |
|
// inherit Map javadoc |
596 |
|
public boolean isEmpty() { |
597 |
+ |
final Segment[] segments = this.segments; |
598 |
|
/* |
599 |
|
* We need to keep track of per-segment modCounts to avoid ABA |
600 |
|
* problems in which an element in one segment was added and |
627 |
|
|
628 |
|
// inherit Map javadoc |
629 |
|
public int size() { |
630 |
+ |
final Segment[] segments = this.segments; |
631 |
|
int[] mc = new int[segments.length]; |
632 |
|
for (;;) { |
633 |
|
long sum = 0; |
701 |
|
if (value == null) |
702 |
|
throw new NullPointerException(); |
703 |
|
|
704 |
+ |
final Segment[] segments = this.segments; |
705 |
|
int[] mc = new int[segments.length]; |
706 |
|
for (;;) { |
707 |
|
int sum = 0; |