diff options
author | Martin Odersky <odersky@gmail.com> | 2009-10-02 17:57:16 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-10-02 17:57:16 +0000 |
commit | 83b67aa805fd1329d6bcc54b1c1fa16416437b6f (patch) | |
tree | 3fcc59ba0523f644bceef4676f7a6689f9949417 /src/library/scala/collection/mutable/LinearSeq.scala | |
parent | 84146e2f53fb1f5e8abbc521121078e932cf82e7 (diff) | |
download | scala-83b67aa805fd1329d6bcc54b1c1fa16416437b6f.tar.gz scala-83b67aa805fd1329d6bcc54b1c1fa16416437b6f.tar.bz2 scala-83b67aa805fd1329d6bcc54b1c1fa16416437b6f.zip |
Sequence->Seq
Diffstat (limited to 'src/library/scala/collection/mutable/LinearSeq.scala')
-rw-r--r-- | src/library/scala/collection/mutable/LinearSeq.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/LinearSeq.scala b/src/library/scala/collection/mutable/LinearSeq.scala new file mode 100644 index 0000000000..285dc7721d --- /dev/null +++ b/src/library/scala/collection/mutable/LinearSeq.scala @@ -0,0 +1,32 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + + +package scala.collection +package mutable + +import generic._ + +/** A subtrait of <code>collection.Seq</code> which represents sequences + * that cannot be mutated. + * + * @since 2.8 + */ +trait LinearSeq[A] extends Seq[A] + with scala.collection.LinearSeq[A] + with GenericTraversableTemplate[A, LinearSeq] + with LinearSeqLike[A, LinearSeq[A]] { + override def companion: GenericCompanion[LinearSeq] = LinearSeq +} + +object LinearSeq extends SeqFactory[LinearSeq] { + implicit def builderFactory[A]: BuilderFactory[A, LinearSeq[A], Coll] = new VirtualBuilderFactory[A] + def newBuilder[A]: Builder[A, LinearSeq[A]] = new MutableList[A] +} |