On this page
Trait Factory.Factory
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.
Type parameters |
|
---|---|
Supertypes | |
Known subtypes |
Abstract methods
Source
def fromSpecific(it: IterableOnce[A]): C
Value parameters |
|
---|---|
Returns | A collection of type |
Source
def newBuilder: Builder[A, C]
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.
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/collection/Factory.html