Scala Library
|
|
scala/Array.scala
]
object
Array
extends
SequenceFactory[Array]Method Summary | |
def
|
apply (xs : Char*) : Array[Char] |
def
|
apply (xs : Float*) : Array[Float] |
def
|
apply (xs : Int*) : Array[Int] |
def
|
apply (xs : Long*) : Array[Long] |
def
|
apply (xs : Byte*) : Array[Byte] |
def
|
apply (xs : Unit*) : Array[Unit] |
def
|
apply (xs : Double*) : Array[Double] |
def
|
apply (xs : Boolean*) : Array[Boolean] |
def
|
apply (xs : Short*) : Array[Short] |
override def
|
apply
[A](xs : A*) : Array[A]
Create an array with given elements.
|
implicit def
|
builderFactory [A] : BuilderFactory[A, Array[A], Array] |
def
|
concat
[T](xs : Sequence[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. |
override def
|
empty
[A] : Array[A]
Returns array of length 0
|
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, 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) => 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, 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
|
newBuilder [A] : Builder[A, Array[A]] |
def
|
ofDim [A](n1 : Int, n2 : Int, n3 : Int) : Array[Array[Array[A]]] |
def
|
ofDim [A](n1 : Int, n2 : Int, n3 : Int, n4 : Int) : Array[Array[Array[Array[A]]]] |
def
|
ofDim
[A](n1 : Int) : Array[A]
Create array with given dimensions
|
def
|
ofDim [A](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int) : Array[Array[Array[Array[Array[A]]]]] |
def
|
ofDim [A](n1 : Int, n2 : Int) : Array[Array[A]] |
Methods inherited from SequenceFactory | |
unapplySeq |
Methods inherited from TraversableFactory | |
concat, fill, fill, fill, fill, fill, tabulate, tabulate, tabulate, tabulate, tabulate, range, range, iterate |
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 |
implicit
def
builderFactory[A] : BuilderFactory[A, Array[A], Array]
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 sequencesxs -
the elements to put in the array
def
ofDim[A](n1 : Int, n2 : Int, n3 : Int, n4 : Int, n5 : Int) : Array[Array[Array[Array[Array[A]]]]]
def
make[A](n : Int, elem : A) : Array[A]
n -
the length of the resulting arrayelem -
the element composing the resulting arrayf
over given range [0..n)
def
fromFunction[A](f : (Int, Int) => A)(n1 : Int, n2 : Int) : Array[Array[A]]
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)
Scala Library
|
|