summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-16 05:51:35 +0000
committerPaul Phillips <paulp@improving.org>2011-07-16 05:51:35 +0000
commit29e501db0b70abb6e6791b03c7af6fc11cadfc20 (patch)
tree72f3a6d1321aa4b443bcc405740543d83cb167ae
parentaa674f304d945c6c400bceeef5a8db90f3ee73d0 (diff)
downloadscala-29e501db0b70abb6e6791b03c7af6fc11cadfc20.tar.gz
scala-29e501db0b70abb6e6791b03c7af6fc11cadfc20.tar.bz2
scala-29e501db0b70abb6e6791b03c7af6fc11cadfc20.zip
Added Vector class documentation.
-rw-r--r--src/library/scala/collection/immutable/Vector.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala
index 5adbcbb524..4ed838c7a3 100644
--- a/src/library/scala/collection/immutable/Vector.scala
+++ b/src/library/scala/collection/immutable/Vector.scala
@@ -15,6 +15,13 @@ import scala.collection.generic._
import scala.collection.mutable.Builder
import scala.collection.parallel.immutable.ParVector
+/** Vector is a general-purpose, immutable data structure. It provides random access and updates
+ * in effectively constant time, as well as very fast append and prepend. Because vectors strike
+ * a good balance between fast random selections and fast random functional updates, they are
+ * currently the default implementation of immutable indexed sequences. It is backed by a little
+ * endian bit-mapped vector trie with a branching factor of 32. Locality is very good, but not
+ * contiguous, which is good for very large sequences.
+ */
object Vector extends SeqFactory[Vector] {
@inline implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, Vector[A]] =
ReusableCBF.asInstanceOf[CanBuildFrom[Coll, A, Vector[A]]]