scala
object Array

[source: `scala/Array.scala`]

`` `object` Array
  `extends` AnyRef

  This object contains utility methods operating on arrays.

Author
  Martin Odersky
Version
  1.0

Method Summary
`def` | apply (xs : Byte*) : Array[Byte]
`def` | apply (xs : Float*) : Array[Float]
`def` | apply (xs : Long*) : Array[Long]
`def` | apply (xs : Unit*) : Array[Unit]
`def` | apply (xs : Char*) : Array[Char]
`def` | apply (xs : Int*) : Array[Int]
`def` | apply (xs : Boolean*) : Array[Boolean]
`def` | apply [A <: AnyRef](xs : A*) : Array[A] Create an array with given elements.
`def` | apply (xs : Short*) : Array[Short]
`def` | apply (xs : Double*) : Array[Double]
`def` | concat [T](xs : Array[T]*) : Array[T] Concatenate all argument arrays into a single array.
`def` | copy (src : AnyRef, srcPos : Int, dest : AnyRef, destPos : Int, length : Int) : Unit Copy one array to another. Equivalent to `System.arraycopy(src, srcPos, dest, destPos, length)`, except that this works also for polymorphic and boxed arrays.
`def` | make [a](n : Int, elem : a) : Array[a] Create an array containing several copies of an element.
`def` | range (start : Int, end : Int) : Array[Int] Create a an array containing of successive integers.
`def` | unapplySeq [A](x : Array[A]) : Option[Seq[A]] This method is called as a result of a pattern match { case Array(...) => } or val Array(...) = ....

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`` `def` copy(src : AnyRef, srcPos : Int, dest : AnyRef, destPos : Int, length : Int) : Unit

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

Parameters
  `src -` ...
  `srcPos -` ...
  `dest -` ...
  `destPos -` ...
  `length -` ...

`` `def` concat[T](xs : Array[T]*) : Array[T]

  Concatenate all argument arrays into a single array.

Parameters
  `xs -` ...

`` `def` range(start : Int, end : Int) : Array[Int]

  Create a an array containing of successive integers.

Parameters
  `from -` the value of the first element of the array
  `end -` the value of the last element fo the array plus 1
Returns
  the sorted array of all integers in range [from;end).

`` `def` apply[A <: AnyRef](xs : A*) : Array[A]

  Create an array with given elements.

Parameters
  `xs -` the elements to put in the array
Returns
  the array containing elements xs.

`` `def` apply(xs : Boolean*) : Array[Boolean]

`` `def` apply(xs : Byte*) : Array[Byte]

`` `def` apply(xs : Short*) : Array[Short]

`` `def` apply(xs : Char*) : Array[Char]

`` `def` apply(xs : Int*) : Array[Int]

`` `def` apply(xs : Long*) : Array[Long]

`` `def` apply(xs : Float*) : Array[Float]

`` `def` apply(xs : Double*) : Array[Double]

`` `def` apply(xs : Unit*) : Array[Unit]

`` `def` make[a](n : Int, elem : a) : Array[a]

  Create an array containing several copies of an element.

Parameters
  `n -` the length of the resulting array
  `elem -` the element composing the resulting array
Returns
  an array composed of n elements all equal to elem

`` `def` unapplySeq[A](x : Array[A]) : Option[Seq[A]]

  This method is called as a result of a pattern match { case Array(...) => } or val Array(...) = ....

Parameters
  `x -` the selector value
Returns
  array wrapped in an option