5 |
|
*/ |
6 |
|
|
7 |
|
package jsr166e; |
8 |
– |
import java.io.IOException; |
8 |
|
import java.io.Serializable; |
10 |
– |
import java.io.ObjectInputStream; |
11 |
– |
import java.io.ObjectOutputStream; |
9 |
|
|
10 |
|
/** |
11 |
|
* One or more variables that together maintain a running {@code long} |
16 |
|
* maximum across the variables maintaining updates. |
17 |
|
* |
18 |
|
* <p>This class extends {@link Number}, but does <em>not</em> define |
19 |
< |
* methods such as {@code hashCode} and {@code compareTo} because |
20 |
< |
* instances are expected to be mutated, and so are not useful as |
21 |
< |
* collection keys. |
19 |
> |
* methods such as {@code equals}, {@code hashCode} and {@code |
20 |
> |
* compareTo} because instances are expected to be mutated, and so are |
21 |
> |
* not useful as collection keys. |
22 |
|
* |
23 |
|
* <p><em>jsr166e note: This class is targeted to be placed in |
24 |
|
* java.util.concurrent.atomic.</em> |
62 |
|
|
63 |
|
/** |
64 |
|
* Returns the current maximum. The returned value is |
65 |
< |
* <em>NOT</em> an atomic snapshot: Invocation in the absence of |
65 |
> |
* <em>NOT</em> an atomic snapshot: invocation in the absence of |
66 |
|
* concurrent updates returns an accurate result, but concurrent |
67 |
|
* updates that occur while the value is being calculated might |
68 |
|
* not be incorporated. |
172 |
|
s.writeLong(max()); |
173 |
|
} |
174 |
|
|
175 |
< |
private void readObject(ObjectInputStream s) |
176 |
< |
throws IOException, ClassNotFoundException { |
175 |
> |
private void readObject(java.io.ObjectInputStream s) |
176 |
> |
throws java.io.IOException, ClassNotFoundException { |
177 |
|
s.defaultReadObject(); |
178 |
|
busy = 0; |
179 |
|
cells = null; |