trait SeqLike[+A, +C[X] <: Seq[X]] extends IterableLike[A, C] with SeqMonoTransforms[A, C[A]] with Equals
Base trait for Seq operations
- Alphabetic
- By Inheritance
- SeqLike
- Equals
- SeqMonoTransforms
- IterableLike
- IterablePolyTransforms
- IterableMonoTransforms
- IterableOps
- FromIterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
coll: C[A]
- Attributes
- protected
- Definition Classes
- SeqLike → IterablePolyTransforms → IterableMonoTransforms → IterableOps
-
abstract
def
fromIterable[B](coll: Iterable[B]): C[B]
- Definition Classes
- IterablePolyTransforms
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++[B >: A](xs: IterableOnce[B]): C[B]
Concatenation
Concatenation
- Definition Classes
- IterablePolyTransforms
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canEqual(that: Any): Boolean
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
- that
The object with which this $coll should be compared
- returns
true, if this $coll can possibly equalthat,falseotherwise. The test takes into consideration only the run-time types of objects but ignores their elements.
- Definition Classes
- SeqLike → Equals
-
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
- IterableOps
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
copyToArray[B >: A](xs: Array[B], start: Int = 0): 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): C[A @scala.annotation.unchecked.uncheckedVariance]
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(o: Any): Boolean
- Definition Classes
- SeqLike → Equals → AnyRef → Any
-
def
filter(p: (A) ⇒ Boolean): C[A @scala.annotation.unchecked.uncheckedVariance]
All elements satisfying predicate
pAll elements satisfying predicate
p- Definition Classes
- IterableMonoTransforms
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ IterableOnce[B]): C[B]
Flatmap
Flatmap
- Definition Classes
- IterablePolyTransforms
-
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
fromIterableWithSameElemType(coll: Iterable[A]): C[A]
Create a collection of type
C[A]from the elements ofcoll, which has the same element type as this collection.Create a collection of type
C[A]from the elements ofcoll, which has the same element type as this collection. Overridden in StringOps and ArrayOps.- Attributes
- protected[this]
- Definition Classes
- SeqLike → IterableLike → IterableMonoTransforms
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- SeqLike → AnyRef → 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
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
- IterableOps
-
def
map[B](f: (A) ⇒ B): C[B]
Map
Map
- Definition Classes
- IterablePolyTransforms
-
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Is the collection not empty?
Is the collection not empty?
- Definition Classes
- IterableOps
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
partition(p: (A) ⇒ Boolean): (C[A @scala.annotation.unchecked.uncheckedVariance], C[A @scala.annotation.unchecked.uncheckedVariance])
A pair of, first, all elements that satisfy prediacte
pand, second, all elements that do not.A pair of, first, all elements that satisfy prediacte
pand, second, all elements that do not. Interesting because it splits a collection in two.The default implementation provided here needs to traverse the collection twice. Strict collections have an overridden version of
partitioninBuildable, which requires only a single traversal.- Definition Classes
- IterableMonoTransforms
-
def
reverse: C[A @scala.annotation.unchecked.uncheckedVariance]
- Definition Classes
- SeqMonoTransforms
-
def
sameElements[B >: A](that: IterableOnce[B]): Boolean
Do the elements of this collection are the same (and in the same order) as those of
that? -
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tail: C[A @scala.annotation.unchecked.uncheckedVariance]
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): C[A @scala.annotation.unchecked.uncheckedVariance]
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: View[A]
A view representing the elements of this collection.
A view representing the elements of this collection.
- Definition Classes
- IterableOps
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
zip[B](xs: IterableOnce[B]): C[(A, B)]
Zip.
Zip. Interesting because it requires to align to source collections.
- Definition Classes
- IterablePolyTransforms