162 |
|
* if the current value is <a href="#bitEquals">bitwise equal</a> |
163 |
|
* to the expected value. |
164 |
|
* |
165 |
< |
* <p>May <a href="package-summary.html#Spurious">fail spuriously</a> |
165 |
> |
* <p>May <a |
166 |
> |
* href="http://download.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/package-summary.html#Spurious"> |
167 |
> |
* fail spuriously</a> |
168 |
|
* and does not provide ordering guarantees, so is only rarely an |
169 |
|
* appropriate alternative to {@code compareAndSet}. |
170 |
|
* |
224 |
|
if (iMax == -1) |
225 |
|
return "[]"; |
226 |
|
|
227 |
< |
StringBuilder b = new StringBuilder(); |
227 |
> |
// Double.toString(Math.PI).length() == 17 |
228 |
> |
StringBuilder b = new StringBuilder((17 + 2) * (iMax + 1)); |
229 |
|
b.append('['); |
230 |
< |
for (int i = 0; ; i++) { |
230 |
> |
for (int i = 0;; i++) { |
231 |
|
b.append(longBitsToDouble(getRaw(byteOffset(i)))); |
232 |
|
if (i == iMax) |
233 |
|
return b.append(']').toString(); |