Scala Library
|
|
scala/Array.scala
]
object
Array
extends
AnyRefMethod Summary | |
def
|
apply (xs : Int*) : Array[Int] |
def
|
apply (xs : Char*) : Array[Char] |
def
|
apply (xs : Short*) : Array[Short] |
def
|
apply (xs : Boolean*) : Array[Boolean] |
def
|
apply (xs : Unit*) : Array[Unit] |
def
|
apply (xs : Double*) : Array[Double] |
def
|
apply (xs : Float*) : Array[Float] |
def
|
apply (xs : Byte*) : Array[Byte] |
def
|
apply
[A <: AnyRef](xs : A*) : Array[A]
Create an array with given elements.
|
def
|
apply (xs : Long*) : Array[Long] |
def
|
concat
[T](xs : Seq[T]*) : Array[T]
Concatenate all argument sequences 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
|
fromFunction
[A](f : (Int) => A)(n : Int) : Array[A]
Create an array containing the values of a given function
f
over given range [0..n) |
def
|
fromFunction
[A](f : (Int, Int) => A)(n1 : Int, n2 : Int) : Array[Array[A]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2) |
def
|
fromFunction
[A](f : (Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int) : Array[Array[Array[A]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3) |
def
|
fromFunction
[A](f : (Int, Int, Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int) : Array[Array[Array[Array[Array[A]]]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3, 0..n4, 0..n5) |
def
|
fromFunction
[A](f : (Int, Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int, n4 : Int) : Array[Array[Array[Array[A]]]]
Create an array containing the values of a given function
f
over given range [0..n1, 0..n2, 0..n3, 0..n4) |
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 |
Class Summary | |
trait
|
Array0
[A] extends ArrayLike[A]
|
trait
|
ArrayLike
[A] extends Mutable[A]
|
trait
|
Projection
[A] extends MutableProjection[A] with ArrayLike[A]
|
Method Details |
System.arraycopy(src, srcPos, dest, destPos, length)
,
except that this works also for polymorphic and boxed arrays.src -
...srcPos -
...dest -
...destPos -
...length -
...xs -
the given argument sequencesfrom -
the value of the first element of the arrayend -
the value of the last element fo the array plus 1xs -
the elements to put in the arrayn -
the length of the resulting arrayelem -
the element composing the resulting arrayf
over given range [0..n)
f
over given range [0..n1, 0..n2)
def
fromFunction[A](f : (Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int) : Array[Array[Array[A]]]
f
over given range [0..n1, 0..n2, 0..n3)
def
fromFunction[A](f : (Int, Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int, n4 : Int) : Array[Array[Array[Array[A]]]]
f
over given range [0..n1, 0..n2, 0..n3, 0..n4)
def
fromFunction[A](f : (Int, Int, Int, Int, Int) => A)(n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int) : Array[Array[Array[Array[Array[A]]]]]
f
over given range [0..n1, 0..n2, 0..n3, 0..n4, 0..n5)
x -
the selector value
Scala Library
|
|