summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/generic/BitSetFactory.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/collection/generic/BitSetFactory.scala')
-rw-r--r--src/library/scala/collection/generic/BitSetFactory.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/library/scala/collection/generic/BitSetFactory.scala b/src/library/scala/collection/generic/BitSetFactory.scala
new file mode 100644
index 0000000000..479a857ee7
--- /dev/null
+++ b/src/library/scala/collection/generic/BitSetFactory.scala
@@ -0,0 +1,19 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+// $Id: Traversable.scala 15188 2008-05-24 15:01:02Z stepancheg $
+package scala.collection.generic
+
+trait BitSetFactory[Coll <: BitSet with BitSetTemplate[Coll]] {
+ def newBuilder: Builder[Int, Coll] = new AddingBuilder[Int, Coll](empty)
+ def empty: Coll
+ def apply(elems: Int*): Coll = (empty /: elems) (_ + _)
+ def bitsetBuilderFactory = new BuilderFactory[Int, Coll, Coll] {
+ def apply(from: Coll) = newBuilder
+ }
+}
+