NArray

narr.native.`package`.NArray
object NArray

Attributes

Source
package.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
NArray.type

Members list

Value members

Concrete methods

inline def copyAs[T, B >: T](original: Array[T], newLength: Int)(using ClassTag[B]): Array[B]

Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length. The new array can have a different type than the original one as long as the values are assignment-compatible. When copying between primitive and object arrays, boxing and unboxing are supported.

Copy one array to another, truncating or padding with default values (if necessary) so the copy has the specified length. The new array can have a different type than the original one as long as the values are assignment-compatible. When copying between primitive and object arrays, boxing and unboxing are supported.

Equivalent to Java's java.util.Arrays.copyOf(original, newLength, newType), except that this works for all combinations of primitive and object arrays in a single method.

Attributes

See also

java.util.Arrays#copyOf

Source
package.scala
inline def copyByteArray(src: ByteArray, dest: ByteArray, destPos: Int): Unit

Copy one array to another.

Copy one array to another.

Note that the passed-in dest array will be modified by this call.

Value parameters

dest

destination array.

destPos

starting position in the destination array.

src

the source array.

Attributes

See also

java.lang.System#arraycopy

Source
package.scala
inline def copyByteArray(src: ByteArray, srcPos: Int, dest: ByteArray, destPos: Int, length: Int): Unit

Copy one array to another. Equivalent to Java's System.arraycopy(src, srcPos, dest, destPos, length), except that this also works for polymorphic and boxed arrays.

Copy one array to another. Equivalent to Java's System.arraycopy(src, srcPos, dest, destPos, length), except that this also works for polymorphic and boxed arrays.

Note that the passed-in dest array will be modified by this call.

Value parameters

dest

destination array.

destPos

starting position in the destination array.

length

the number of array elements to be copied.

src

the source array.

srcPos

starting position in the source array.

Attributes

See also

java.lang.System#arraycopy

Source
package.scala
inline def copyDoubleArray(src: DoubleArray, dest: DoubleArray, destPos: Int): Unit

Attributes

Source
package.scala
inline def copyDoubleArray(src: DoubleArray, srcPos: Int, dest: DoubleArray, destPos: Int, length: Int): Unit

Attributes

Source
package.scala
inline def copyFloatArray(src: FloatArray, dest: FloatArray, destPos: Int): Unit

Attributes

Source
package.scala
inline def copyFloatArray(src: FloatArray, srcPos: Int, dest: FloatArray, destPos: Int, length: Int): Unit

Attributes

Source
package.scala
inline def copyIntArray(src: IntArray, dest: IntArray, destPos: Int): Unit

Attributes

Source
package.scala
inline def copyIntArray(src: IntArray, srcPos: Int, dest: IntArray, destPos: Int, length: Int): Unit

Attributes

Source
package.scala
inline def copyNativeArray[T](src: Array[T], dest: Array[T], destPos: Int): Unit

Attributes

Source
package.scala
inline def copyNativeArray[T](src: Array[T], srcPos: Int, dest: Array[T], destPos: Int, length: Int): Unit

Attributes

Source
package.scala
inline def copyShortArray(src: ShortArray, dest: ShortArray, destPos: Int): Unit

Attributes

Source
package.scala
inline def copyShortArray(src: ShortArray, srcPos: Int, dest: ShortArray, destPos: Int, length: Int): Unit

Attributes

Source
package.scala

Exports

Defined exports

Exported from Array$

Attributes

Source
package.scala
Exported from Array
def empty[T : ClassTag]: Array[T]
Exported from Array
def newBuilder[T](implicit t: ClassTag[T]): ArrayBuilder[T]
Exported from Array
Exported from Array