28 |
|
* |
29 |
|
* <p> Method {@link #sum} returns the current combined total across |
30 |
|
* the variables maintaining the sum. This value is <em>NOT</em> an |
31 |
< |
* atomic snapshot: Invocation of <code>sum</code> in the absence of |
31 |
> |
* atomic snapshot: Invocation of {@code sum} in the absence of |
32 |
|
* concurrent updates returns an accurate result, but concurrent |
33 |
|
* updates that occur while the sum is being calculated might not be |
34 |
< |
* incorporated. The sum may also be <code>reset</code> to zero, as |
34 |
> |
* incorporated. The sum may also be {@code reset} to zero, as |
35 |
|
* an alternative to creating a new adder. However, method {@link |
36 |
|
* #reset} is intrinsically racy, so should only be used when it is |
37 |
|
* known that no threads are concurrently updating the sum. |