Scala Library: scala.collection.generic.CanCombineFrom
scala.collection.generic.CanCombineFrom
A base trait for parallel builder factories.
- From
- the type of the underlying collection that requests a builder to be created.
- Elem
- the element type of the collection to be created.
- To
- the type of the collection to be created.
- Source
- Since
- 2.8
Abstract Value Members From scala.collection.generic.CanCombineFrom
abstract def apply(): Combiner[Elem, To]
Creates a new builder from scratch.
- returns
- a builder for collections of type
To
with element typeElem
.
- a builder for collections of type
- Definition Classes
- CanCombineFrom → CanBuildFrom
- See also
- scala.collection.breakOut
(defined at scala.collection.generic.CanCombineFrom)
abstract def apply(from: From): Combiner[Elem, To]
Creates a new builder on request of a collection.
- from
- the collection requesting the builder to be created.
- returns
- a builder for collections of type
To
with element typeElem
. The collections framework usually arranges things so that the created builder will build the same kind of collection asfrom
.
- a builder for collections of type
- Definition Classes
- CanCombineFrom → CanBuildFrom (defined at scala.collection.generic.CanCombineFrom)
Full Source:
Interested in Scala?
I send out weekly, personalized emails with articles and conference talks.
Subscribe now.