@implicitNotFound(msg = "Cannot construct a collection of type ${C} with elements of type ${A} based on a collection of type ${From}.") trait BuildFrom[-From, -A, +C]
Builds a collection of type C
from elements of type A
when a source collection of type From
is available.
Implicit instances of BuildFrom
are available for all collection types.
- Type Params
- A
Type of elements (e.g.
Int
,Boolean
, etc.)- C
Type of collection (e.g.
List[Int]
,TreeMap[Int, String]
, etc.)- From
Type of source collection
- Companion
- object
- Source
- BuildFrom.scala
Value members
Abstract methods
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.
- Source
- BuildFrom.scala
Concrete methods
Deprecated methods
@deprecated("Use newBuilder() instead of apply()", "2.13.0") @inline
- Deprecated
- Source
- BuildFrom.scala