EvidenceIterableFactory

scala.collection.EvidenceIterableFactory
See theEvidenceIterableFactory companion object
trait EvidenceIterableFactory[+CC[_], Ev[_]] extends Serializable

Base trait for companion objects of collections that require an implicit evidence.

Attributes

CC

Collection type constructor (e.g. ArraySeq)

Ev

Unary type constructor for the implicit evidence required for an element type (typically Ordering or ClassTag)

Companion:
object
Source:
Factory.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Delegate[CC]
class Delegate[CC]
object ArraySeq.type
object ArraySeq.type
object UnrolledBuffer.type
class Delegate[CC, Ev]
class Delegate[CC]
object SortedSet.type
object SortedSet.type
object SortedSet.type
object TreeSet.type
object PriorityQueue.type
object TreeSet.type

Members list

Concise view

Value members

Abstract methods

def empty[A : Ev]: CC[A]

Attributes

Source:
Factory.scala
def from[E : Ev](it: IterableOnce[E]): CC[E]

Attributes

Source:
Factory.scala
def newBuilder[A : Ev]: Builder[A, CC[A]]

Attributes

Source:
Factory.scala

Concrete methods

def apply[A : Ev](xs: A*): CC[A]

Attributes

Source:
Factory.scala
def fill[A : Ev](n: Int)(elem: => A): CC[A]

Produces a collection containing the results of some element computation a number of times.

Produces a collection containing the results of some element computation a number of times.

Attributes

elem

the element computation

n

the number of elements contained in the collection.

Returns:

A collection that contains the results of n evaluations of elem.

Source:
Factory.scala
def iterate[A : Ev](start: A, len: Int)(f: A => A): CC[A]

Produces a collection containing repeated applications of a function to a start value.

Produces a collection containing repeated applications of a function to a start value.

Attributes

f

the function that's repeatedly applied

len

the number of elements contained in the collection

start

the start value of the collection

Returns:

a collection with len values in the sequence start, f(start), f(f(start)), ...

Source:
Factory.scala
def tabulate[A : Ev](n: Int)(f: Int => A): CC[A]

Produces a collection containing values of a given function over a range of integer values starting from 0.

Produces a collection containing values of a given function over a range of integer values starting from 0.

Attributes

f

The function computing element values

n

The number of elements in the collection

Returns:

A collection consisting of elements f(0), ..., f(n -1)

Source:
Factory.scala
def unfold[A : Ev, S](init: S)(f: S => Option[(A, S)]): CC[A]

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Attributes

A

Type of the elements

S

Type of the internal state

f

Computes the next element (or returns None to signal the end of the collection)

init

State initial value

Returns:

a collection that produces elements using f until f returns None

Source:
Factory.scala

Implicits

Implicits

implicit def evidenceIterableFactory[A : Ev]: Factory[A, CC[A]]

Attributes

Source:
Factory.scala