summaryrefslogtreecommitdiff
path: root/src/library/scala/runtime/ObjectRef.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/runtime/ObjectRef.java')
-rw-r--r--src/library/scala/runtime/ObjectRef.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/scala/runtime/ObjectRef.java b/src/library/scala/runtime/ObjectRef.java
index c8298b8b21..b34f81c9c8 100644
--- a/src/library/scala/runtime/ObjectRef.java
+++ b/src/library/scala/runtime/ObjectRef.java
@@ -16,5 +16,9 @@ public class ObjectRef<T> implements java.io.Serializable {
public T elem;
public ObjectRef(T elem) { this.elem = elem; }
+ @Override
public String toString() { return String.valueOf(elem); }
+
+ public static <U> ObjectRef<U> create(U e) { return new ObjectRef<U>(e); }
+ public static ObjectRef<Object> zero() { return new ObjectRef<Object>(null); }
}