final class ArrayOps[A] extends AnyVal with IterableOps[A] with SeqMonoTransforms[A, Array[A]] with Buildable[A, Array[A]] with ArrayLike[A]
- Alphabetic
- By Inheritance
- ArrayOps
- ArrayLike
- Buildable
- SeqMonoTransforms
- IterableMonoTransforms
- IterableOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ArrayOps(xs: Array[A])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
- def ++[B >: A](xs: IterableOnce[B])(implicit arg0: ClassTag[B]): Array[B]
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
- def apply(i: Int): A
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
className: String
The class name of this collection.
The class name of this collection. To be used for converting to string. Collections generally print like this:
<className>(elem_1, ..., elem_n)
- Definition Classes
- ArrayOps → IterableOps
-
def
coll: ArrayView[A]
- Attributes
- protected
- Definition Classes
- ArrayOps → IterableMonoTransforms → IterableOps
-
def
copyToArray[B >: A](xs: Array[B], start: Int = 0): IterableOps.copyToArray.xs.type
Copy all elements of this collection to array
xs, starting atstart.Copy all elements of this collection to array
xs, starting atstart.- Definition Classes
- IterableOps
-
def
drop(n: Int): Array[A]
The rest of the collection without its
nfirst elements.The rest of the collection without its
nfirst elements. For linear, immutable collections this should avoid making a copy.- Definition Classes
- IterableMonoTransforms
- def elemTag: ClassTag[A]
-
def
filter(p: (A) ⇒ Boolean): Array[A]
All elements satisfying predicate
pAll elements satisfying predicate
p- Definition Classes
- IterableMonoTransforms
- def flatMap[B](f: (A) ⇒ IterableOnce[B])(implicit arg0: ClassTag[B]): Array[B]
-
def
foldLeft[B](z: B)(op: (B, A) ⇒ B): B
Fold left
Fold left
- Definition Classes
- IterableOps
-
def
foldRight[B](z: B)(op: (A, B) ⇒ B): B
Fold right
Fold right
- Definition Classes
- IterableOps
-
def
foreach[U](f: (A) ⇒ U): Unit
Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.- Definition Classes
- IterableOps
- def fromIterable[B](coll: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
-
def
fromIterableWithSameElemType(coll: Iterable[A]): Array[A]
- Attributes
- protected
- Definition Classes
- ArrayOps → IterableMonoTransforms
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
head: A
The first element of the collection.
The first element of the collection.
- Definition Classes
- IterableOps
-
def
indexWhere(p: (A) ⇒ Boolean): Int
The index of the first element in this collection for which
pholds.The index of the first element in this collection for which
pholds.- Definition Classes
- IterableOps
-
def
isEmpty: Boolean
Is the collection empty?
Is the collection empty?
- Definition Classes
- IterableOps
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator(): Iterator[A]
-
def
knownSize: Int
The number of elements in this collection, if it can be cheaply computed, -1 otherwise.
The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.
- Definition Classes
- ArrayOps → IterableOps
- def length: Int
- def map[B](f: (A) ⇒ B)(implicit arg0: ClassTag[B]): Array[B]
-
def
mkString(sep: String): String
A string showing all elements of this collection, separated by string
sep.A string showing all elements of this collection, separated by string
sep.- Definition Classes
- IterableOps
-
def
newBuilder: Builder[A, Array[A]]
Creates a new builder.
-
def
nonEmpty: Boolean
Is the collection not empty?
Is the collection not empty?
- Definition Classes
- IterableOps
-
def
partition(p: (A) ⇒ Boolean): (Array[A], Array[A])
Optimized, push-based version of
partition.Optimized, push-based version of
partition.- Definition Classes
- Buildable → IterableMonoTransforms
-
def
reverse: Array[A]
- Definition Classes
- SeqMonoTransforms
-
def
size: Int
The number of elements in this collection.
The number of elements in this collection. Does not terminate for infinite collections.
- Definition Classes
- IterableOps
-
def
tail: Array[A]
The rest of the collection without its first element.
The rest of the collection without its first element.
- Definition Classes
- IterableMonoTransforms
-
def
take(n: Int): Array[A]
A collection containing the first
nelements of this collection.A collection containing the first
nelements of this collection.- Definition Classes
- IterableMonoTransforms
-
def
to[C[X] <: Iterable[X]](fi: FromIterable[C]): C[A]
Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A].Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A]. Example uses:xs.to(List) xs.to(ArrayBuffer)
- Definition Classes
- IterableOps
-
def
toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
Convert collection to array.
Convert collection to array.
- Definition Classes
- IterableOps
-
def
toString(): String
- Definition Classes
- IterableOps → Any
-
def
view: ArrayView[A]
A view representing the elements of this collection.
A view representing the elements of this collection.
- Definition Classes
- ArrayOps → IterableOps
- val xs: Array[A]
- def zip[B](xs: IterableOnce[B])(implicit arg0: ClassTag[B]): Array[(A, B)]