[Since version 2.13.0]Will be removed in the future.This is a type alias forjava.util.ConcurrentModificationException, which may be thrown by methods that detect an invalid modification of an object.
This is a type alias forjava.util.ConcurrentModificationException, which may be thrown by methods that detect an invalid modification of an object. For example, many common collection types do not allow modifying a collection while it is being iterated over.
[Since version 2.13.0]Use `java.util.ConcurrentModificationException` instead.Thrown when a stack overflow occurs because a method or function recurses too deeply.
Thrown when a stack overflow occurs because a method or function recurses too deeply.
On the JVM, this is a type alias forjava.lang.StackOverflowError, which itself extendsjava.lang.Error. The same rules apply to catching ajava.lang.Error as for Java, that it indicates a serious problem that a reasonable application should not try and catch.
[Since version 2.13.0]Use `java.lang.StackOverflowError` instead.Assigns the value of 0 to each element in the array.
Assigns the value of 0 to each element in the array.
A non-null Array[Int].
java.lang.NullPointerExceptionIfarr isnull.
[Since version 2.13.0]Use `java.util.Arrays#fill` instead.Copieslength elements of arraysrc starting at positionsrcPos to the arraydest starting at positiondestPos.
Copieslength elements of arraysrc starting at positionsrcPos to the arraydest starting at positiondestPos. Ifsrc==dest, the copying will behave as if the elements copied fromsrc were first copied to a temporary array before being copied back into the array at the destination positions.
A non-null array as destination for the copy.
The starting index in the destination array.
The number of elements to be copied.
A non-null array as source for the copy.
The starting index in the source array.
java.lang.ArrayStoreExceptionIf eithersrc ordest are not of type [java.lang.Array]; or if the element type ofsrc is not compatible with that ofdest.
java.lang.IndexOutOfBoundsExceptionIf eithersrcPos ordestPos are outside of the bounds of their respective arrays; or iflength is negative; or if there are less thanlength elements available aftersrcPos ordestPos insrc anddest respectively.
java.lang.NullPointerExceptionIf eithersrc ordest arenull.
[Since version 2.13.0]Use `java.lang.System#arraycopy` instead.Runs the garbage collector.
Runs the garbage collector.
This is a request that the underlying JVM runs the garbage collector. The results of this call depends heavily on the JVM used. The underlying JVM is free to ignore this request.
[Since version 2.13.0]Use `java.lang.System#gc` instead.Creates a new array of the specified type and given length.
Creates a new array of the specified type and given length.
Note that ifelemClass is a subclass ofscala.AnyVal then the returned value is an Array of the corresponding java primitive type. For example, the following codescala.compat.Platform.createArray(classOf[Int], 4) returns an array of the java primitive typeint.
For ascala.AnyVal array, the values of the array are set to 0 fornumeric value types (scala.Double,scala.Float,scala.Long,scala.Int,scala.Char,scala.Short, andscala.Byte), andfalse forscala.Boolean. Creation of an array of typescala.Unit is not possible.
For subclasses ofscala.AnyRef, the values of the array are set tonull.
The caller must cast the returned value to the correct type.
theClass object of the component type of the array
the length of the new array.
an array of the given component type as anAnyRef.
java.lang.IllegalArgumentExceptionif componentType isscala.Unit orjava.lang.Void.TYPE
java.lang.NegativeArraySizeException if the specified length is negative
java.lang.NullPointerExceptionIfelemClass isnull.
val a = scala.compat.Platform.createArray(classOf[Int], 4).asInstanceOf[Array[Int]] // returns Array[Int](0, 0, 0, 0)[Since version 2.13.0]Use `java.lang.reflect.Array#newInstance` instead.The current time in milliseconds.
The current time in milliseconds. The time is counted since 1 January 1970 UTC.
Note that the operating system timer used to obtain this value may be less precise than a millisecond.
[Since version 2.13.0]Use `java.lang.System#currentTimeMillis` instead.The name of the default character set encoding as a string
The name of the default character set encoding as a string
[Since version 2.13.0]Use `java.nio.charset.Charset.defaultCharset#name` instead.Returns theClass object associated with the class or interface with the given string name using the currentClassLoader.
Returns theClass object associated with the class or interface with the given string name using the currentClassLoader. On the JVM, invoking this method is equivalent to:java.lang.Class.forName(name)
For more information, please see the Java documentation forjava.lang.Class.
the fully qualified name of the desired class.
theClass object for the class with the specified name.
java.lang.ClassNotFoundException if the class cannot be located
java.lang.ExceptionInInitializerError if the initialization provoked by this method fails
java.lang.LinkageError if the linkage fails
val a = scala.compat.Platform.getClassForName("java.lang.Integer") // returns the Class[_] for java.lang.Integer[Since version 2.13.0]Use `java.lang.Class#forName` instead.The default line separator.
The default line separator.
On the JVM, this is equivalent to calling the method:java.lang.System.lineSeparator
[Since version 2.13.0]Use `java.lang.System#lineSeparator` instead.