Factory

scala.collection.Factory
See theFactory companion object
trait Factory[-A, +C]

A factory that builds a collection of type C with elements of type A.

This is a general form of any factory (IterableFactory, SortedIterableFactory, MapFactory and SortedMapFactory) whose element type is fixed.

Attributes

A

Type of elements (e.g. Int, Boolean, etc.)

C

Type of collection (e.g. List[Int], TreeMap[Int, String], etc.)

Companion:
object
Source:
Factory.scala
Graph
Supertypes
class Any
Known subtypes
object ValueSet.type
object BitSet.type
object BitSet.type
object WrappedString.type
object BitSet.type
object DoubleAccumulator.type
object IntAccumulator.type
object LongAccumulator.type

Members list

Concise view

Value members

Abstract methods

def fromSpecific(it: IterableOnce[A]): C

Attributes

it

Source collection

Returns:

A collection of type C containing the same elements as the source collection it.

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

Get a Builder for the collection.

Get a Builder for the collection. For non-strict collection types this will use an intermediate buffer. Building collections with fromSpecific is preferred because it can be lazy for lazy collections.

Attributes

Source:
Factory.scala