File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/library/scala/runtime Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
package scala .runtime ;
12
12
13
- import java .io .*;
14
13
import scala .math .ScalaNumber ;
15
14
16
15
/** An object (static class) that defines methods used for creating,
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ public class ObjectRef<T> implements java.io.Serializable {
16
16
17
17
public T elem ;
18
18
public ObjectRef (T elem ) { this .elem = elem ; }
19
+ @ Override
19
20
public String toString () { return String .valueOf (elem ); }
20
21
21
- public static <U > ObjectRef create (U e ) { return new ObjectRef (e ); }
22
- public static ObjectRef zero () { return new ObjectRef (null ); }
22
+ public static <U > ObjectRef < U > create (U e ) { return new ObjectRef < U > (e ); }
23
+ public static ObjectRef < Object > zero () { return new ObjectRef < Object > (null ); }
23
24
}
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ public class VolatileObjectRef<T> implements java.io.Serializable {
16
16
17
17
volatile public T elem ;
18
18
public VolatileObjectRef (T elem ) { this .elem = elem ; }
19
+ @ Override
19
20
public String toString () { return String .valueOf (elem ); }
20
21
21
- public static <U > VolatileObjectRef create (U e ) { return new VolatileObjectRef (e ); }
22
- public static VolatileObjectRef zero () { return new VolatileObjectRef (null ); }
22
+ public static <U > VolatileObjectRef < U > create (U e ) { return new VolatileObjectRef < U > (e ); }
23
+ public static VolatileObjectRef < Object > zero () { return new VolatileObjectRef < Object > (null ); }
23
24
}
You can’t perform that action at this time.
0 commit comments