Scala Library: GenericCanCombineFrom
scala.collection.generic.ParSetFactory#GenericCanCombineFrom
class GenericCanCombineFrom[A] extends CanCombineFrom[CC[_], A, CC[A]]
Instance Constructors From scala.collection.generic.ParSetFactory.GenericCanCombineFrom ——————————————————————————–
new GenericCanCombineFrom()
(defined at scala.collection.generic.ParSetFactory.GenericCanCombineFrom)
Value Members From scala.collection.generic.ParSetFactory.GenericCanCombineFrom ——————————————————————————–
def apply(): Combiner[A, CC[A]]
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
- GenericCanCombineFrom → CanCombineFrom → CanBuildFrom
- See also
- scala.collection.breakOut
(defined at scala.collection.generic.ParSetFactory.GenericCanCombineFrom)
def apply(from: ParSetFactory.Coll): Combiner[A, CC[A]]
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
- GenericCanCombineFrom → CanCombineFrom → CanBuildFrom
(defined at scala.collection.generic.ParSetFactory.GenericCanCombineFrom)
Value Members From Implicit scala.collection.parallel.CollectionsHaveToParArray ——————————————————————————–
def toParArray: ParArray[T]
- Implicit information
- This member is added by an implicit conversion from GenericCanCombineFrom [A] to CollectionsHaveToParArray [GenericCanCombineFrom [A], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type ( GenericCanCombineFrom [A]) ⇒ GenTraversableOnce [T] is in scope.
- Definition Classes
- CollectionsHaveToParArray (added by implicit convertion: scala.collection.parallel.CollectionsHaveToParArray)
Full Source:
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2010-2013, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
package scala
package collection
package generic
import scala.collection.parallel.Combiner
import scala.collection.parallel.ParSet
import scala.collection.parallel.ParSetLike
import scala.language.higherKinds
/**
* @author Aleksandar Prokopec
* @since 2.8
*/
abstract class ParSetFactory[CC[X] <: ParSet[X] with ParSetLike[X, CC[X], _] with GenericParTemplate[X, CC]]
extends GenSetFactory[CC]
with GenericParCompanion[CC]
{
def newBuilder[A]: Combiner[A, CC[A]] = newCombiner[A]
def newCombiner[A]: Combiner[A, CC[A]]
class GenericCanCombineFrom[A] extends CanCombineFrom[CC[_], A, CC[A]] {
override def apply(from: Coll) = from.genericCombiner[A]
override def apply() = newCombiner[A]
}
}
Interested in Scala?
I send out weekly, personalized emails with articles and conference talks.
Subscribe now.