summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scala/runtime/compat/Platform.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/sources/scala/runtime/compat/Platform.scala b/sources/scala/runtime/compat/Platform.scala
index 05a6f8e21e..df90345c5c 100644
--- a/sources/scala/runtime/compat/Platform.scala
+++ b/sources/scala/runtime/compat/Platform.scala
@@ -19,6 +19,16 @@ object Platform {
def split(str: String, separator: Char): Array[String] = {
str.split(separator.toString());
}
+ def parseByte(s: String): Byte = java.lang.Byte.parseByte(s);
+ def parseShort(s: String): Short = java.lang.Short.parseShort(s);
+ def parseInt(s: String): Int = java.lang.Integer.parseInt(s);
+ def parseLong(s: String): Long = java.lang.Long.parseLong(s);
def parseFloat(s: String): Float = java.lang.Float.parseFloat(s);
def parseDouble(s: String): Double = java.lang.Double.parseDouble(s);
+
+ def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: int): Unit =
+ System.arraycopy(src, srcPos, dest, destPos, length);
+
+ val MAX_INT = java.lang.Integer.MAX_VALUE;
+ def max(x: Int, y: Int): Int = Math.max(x, y);
}