diff options
Diffstat (limited to 'src/library/scala/collection/mutable/ArraySeq.scala')
-rw-r--r-- | src/library/scala/collection/mutable/ArraySeq.scala | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/library/scala/collection/mutable/ArraySeq.scala b/src/library/scala/collection/mutable/ArraySeq.scala index f6f958601d..c903dae55c 100644 --- a/src/library/scala/collection/mutable/ArraySeq.scala +++ b/src/library/scala/collection/mutable/ArraySeq.scala @@ -21,6 +21,23 @@ import generic._ * @author Martin Odersky * @version 2.8 * @since 2.8 + * + * @tparam A type of the elements contained in this array sequence. + * @param length the length of the underlying array. + * + * @define Coll ArraySeq + * @define coll array sequence + * @define thatinfo the class of the returned collection. In the standard library configuration, + * `That` is always `ArraySeq[B]` because an implicit of type `CanBuildFrom[ArraySeq, B, That]` + * is defined in object `ArraySeq`. + * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * result class `That` from the current representation type `Repr` + * and the new element type `B`. This is usually the `canBuildFrom` value + * defined in object `ArraySeq`. + * @define orderDependent + * @define orderDependentFold + * @define mayNotTerminateInf + * @define willNotTerminateInf */ class ArraySeq[A](override val length: Int) extends IndexedSeq[A] @@ -49,7 +66,7 @@ extends IndexedSeq[A] } } - /** Fills the given array <code>xs</code> with at most `len` elements of + /** Fills the given array `xs` with at most `len` elements of * this traversable starting at position `start`. * Copying will stop once either the end of the current traversable is reached or * `len` elements have been copied or the end of the array is reached. @@ -64,7 +81,12 @@ extends IndexedSeq[A] } } +/** $factoryInfo + * @define coll array sequence + * @define Coll ArraySeq + */ object ArraySeq extends SeqFactory[ArraySeq] { + /** $genericCanBuildFromInfo */ implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, ArraySeq[A]] = new GenericCanBuildFrom[A] def newBuilder[A]: Builder[A, ArraySeq[A]] = new ArrayBuffer[A] mapResult { buf => |