trait IterableOps [ +A ]
extends Any

Operations over iterables. No operation defined here is generic in the type of the underlying collection.

Constructors

Members

def className : String

The class name of this collection. To be used for converting to string. Collections generally print like this:

 <className>(elem_1, ..., elem_n)

The class name of this collection. To be used for converting to string. Collections generally print like this:

 <className>(elem_1, ..., elem_n)
protected def coll : Iterable [ A ]
def copyToArray ( xs: Array [ B ] , start: Int ) : xs.type

Copy all elements of this collection to array xs, starting at start.

Copy all elements of this collection to array xs, starting at start.

def copyToArray$default$2 : Int

Copy all elements of this collection to array xs, starting at start.

Copy all elements of this collection to array xs, starting at start.

def foldLeft ( z: B ) ( op: (B, A) => B ) : B

Fold left

Fold left

def foldRight ( z: B ) ( op: (A, B) => B ) : B

Fold right

Fold right

def foreach ( f: A => Unit ) : Unit

Apply f to each element for tis side effects

Apply f to each element for tis side effects

def indexWhere ( p: A => Boolean ) : Int

The index of the first element in this collection for which p holds.

The index of the first element in this collection for which p holds.

def isEmpty : Boolean

Is the collection empty?

Is the collection empty?

private def iterator : Iterator [ A ]
def knownSize : Int

The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.

The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.

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.

def size : Int

The number of elements in this collection. Does not terminate for infinite collections.

The number of elements in this collection. Does not terminate for infinite collections.

def to ( fi: FromIterable [ C ] ) : C [ A ]

Given a collection factory fi for collections of type constructor C, convert this collection to one of type C[A]. Example uses:

xs.to(List)
xs.to(ArrayBuffer)

Given a collection factory fi for collections of type constructor C, convert this collection to one of type C[A]. Example uses:

xs.to(List)
xs.to(ArrayBuffer)
def toArray ( implicit evidence$8: ClassTag [ B ] ) : Array [ B ]

Convert collection to array.

Convert collection to array.

override def toString : String
def view : View [ A ]

A view representing the elements of this collection.

A view representing the elements of this collection.