diff options
author | Martin Odersky <odersky@gmail.com> | 2009-02-15 15:41:08 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-02-15 15:41:08 +0000 |
commit | f2032c958854476587f6e78668b16216a28dc9a8 (patch) | |
tree | ca223769bb1e6fcca3d69b62364646ccc817de59 /src/library/scalax/collection/generic/covariant | |
parent | 04840e2ed4530df9a5ca59b984bf2b37a976dc70 (diff) | |
download | scala-f2032c958854476587f6e78668b16216a28dc9a8.tar.gz scala-f2032c958854476587f6e78668b16216a28dc9a8.tar.bz2 scala-f2032c958854476587f6e78668b16216a28dc9a8.zip |
removed generic/mutable, generic/covariant pack...
removed generic/mutable, generic/covariant packages
Diffstat (limited to 'src/library/scalax/collection/generic/covariant')
6 files changed, 0 insertions, 113 deletions
diff --git a/src/library/scalax/collection/generic/covariant/IterableFactory.scala b/src/library/scalax/collection/generic/covariant/IterableFactory.scala deleted file mode 100755 index 0fd2284cea..0000000000 --- a/src/library/scalax/collection/generic/covariant/IterableFactory.scala +++ /dev/null @@ -1,20 +0,0 @@ -package scalax.collection.generic.covariant - -trait IterableFactory[CC[+A] <: Iterable[A]] extends generic.IterableFactory[CC] { - - /** The empty collection of type CC */ - val empty: CC[Nothing] - - override protected def newBuilder[A]: Builder[CC, A] = - empty.newBuilder[A].asInstanceOf[Builder[CC, A]] - // the cast here is unavoidable because CC is not constrained with covariant.IterableTemplate[CC, A] - // It's can't be constrained because some suntype links between covariant and generic Templates - // are missing. That's a consequence of our hacks to have both nonvariant and covariant templates. - - /** Create CC collection of specified elements */ - override def apply[A](args: A*): CC[A] = - (empty ++ args.asInstanceOf[Iterable[A]]).asInstanceOf[CC[A]] - // the cast here is unavoidable because CC is not constrained with covariant.IterableTemplate[CC, A] - // It's can't be constrained because some suntype links between covariant and generic Templates - // are missing. That's a consequence of our hacks to have both nonvariant and covariant templates. -} diff --git a/src/library/scalax/collection/generic/covariant/IterableTemplate.scala b/src/library/scalax/collection/generic/covariant/IterableTemplate.scala deleted file mode 100755 index 715f88cd8e..0000000000 --- a/src/library/scalax/collection/generic/covariant/IterableTemplate.scala +++ /dev/null @@ -1,39 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id: Iterable.scala 15188 2008-05-24 15:01:02Z stepancheg $ - - -package scalax.collection.generic.covariant - -import annotation.unchecked.uncheckedVariance - -/** Collection classes mixing in this class provide a method - * <code>elements</code> which returns an iterator over all the - * elements contained in the collection. - * - * @note If a collection has a known <code>size</code>, it should also sub-type <code>Collection</code>. - * Only potentially unbounded collections should directly sub-class <code>Iterable</code>. - * @author Matthias Zenger - * @version 1.1, 04/02/2004 - */ -trait IterableTemplate[+CC[+B] <: IterableTemplate[CC, B] with Iterable[B], +A] - extends generic.IterableTemplate[CC, A @uncheckedVariance] { self /*: CC[A]*/ => - -/* can't have a covariant view here, because mutable.Vector would - override it - override def view: IterableView[CC, A] = new IterableView[CC, A] { - val origin = thisCC - val elements: Iterator[A] = self.elements - } -*/ -} - - -// !!! todo: explain why @uncheckedVariance is justified here. - diff --git a/src/library/scalax/collection/generic/covariant/OrderedIterableTemplate.scala b/src/library/scalax/collection/generic/covariant/OrderedIterableTemplate.scala deleted file mode 100755 index 77e72c19d5..0000000000 --- a/src/library/scalax/collection/generic/covariant/OrderedIterableTemplate.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id: Iterable.scala 15188 2008-05-24 15:01:02Z stepancheg $ - - -package scalax.collection.generic.covariant - -import annotation.unchecked.uncheckedVariance - -trait OrderedIterableTemplate[+CC[+B] <: OrderedIterable[B] with OrderedIterableTemplate[CC, B], +A] - extends generic.OrderedIterableTemplate[CC, A @uncheckedVariance] {self /*: CC[A]*/ => } diff --git a/src/library/scalax/collection/generic/covariant/SequenceFactory.scala b/src/library/scalax/collection/generic/covariant/SequenceFactory.scala deleted file mode 100755 index 49a6e685fa..0000000000 --- a/src/library/scalax/collection/generic/covariant/SequenceFactory.scala +++ /dev/null @@ -1,3 +0,0 @@ -package scalax.collection.generic.covariant - -trait SequenceFactory[CC[+A] <: Sequence[A]] extends IterableFactory[CC] with generic.SequenceFactory[CC] diff --git a/src/library/scalax/collection/generic/covariant/SequenceTemplate.scala b/src/library/scalax/collection/generic/covariant/SequenceTemplate.scala deleted file mode 100755 index 1e8a416aec..0000000000 --- a/src/library/scalax/collection/generic/covariant/SequenceTemplate.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id: Sequence.scala 16092 2008-09-12 10:37:06Z nielsen $ - - -package scalax.collection.generic.covariant - -import annotation.unchecked.uncheckedVariance - -trait SequenceTemplate[+CC[+B] <: SequenceTemplate[CC, B] with Sequence[B], +A] - extends generic.SequenceTemplate[CC, A @uncheckedVariance] diff --git a/src/library/scalax/collection/generic/covariant/VectorTemplate.scala b/src/library/scalax/collection/generic/covariant/VectorTemplate.scala deleted file mode 100644 index ee618abd21..0000000000 --- a/src/library/scalax/collection/generic/covariant/VectorTemplate.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id: Sequence.scala 16092 2008-09-12 10:37:06Z nielsen $ - - -package scalax.collection.generic.covariant - -import annotation.unchecked.uncheckedVariance - -trait VectorTemplate[+CC[+B] <: VectorTemplate[CC, B] with Vector[B], +A] - extends generic.VectorTemplate[CC, A @uncheckedVariance] {self /*: CC[A]*/ => } |