summaryrefslogblamecommitdiff
path: root/src/library/scala/collection/parallel/ParSetLike.scala
blob: 9e769f425b9867b0080c4f99e08070bd6ce6c0ac (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                          














                                       









                                                                            












                                                                         
                                                       




















































 
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2003-2011, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */


package scala.collection.parallel



import scala.collection.SetLike
import scala.collection.Set
import scala.collection.mutable.Builder








/** A template trait for parallel sets. This trait is mixed in with concrete
 *  parallel sets to override the representation type.
 *
 *  $sideeffects
 *
 *  @tparam T    the element type of the set
 *
 *  @author Aleksandar Prokopec
 *  @since 2.9
 */
trait ParSetLike[T,
                 +Repr <: ParSetLike[T, Repr, Sequential] with ParSet[T],
                 +Sequential <: Set[T] with SetLike[T, Sequential]]
extends SetLike[T, Repr]
   with ParIterableLike[T, Repr, Sequential]
{ self =>

  protected[this] override def newBuilder: Builder[T, Repr] = newCombiner

  protected[this] override def newCombiner: Combiner[T, Repr]

  override def empty: Repr

  // note: should not override toSet (could be mutable)
}