diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-04-10 15:20:46 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-04-10 15:20:46 +0000 |
commit | e2decb09ed9cbfad6e1c61b68e24423620d01ff3 (patch) | |
tree | a7970f709b9ebaf3f63d6865bc76c45f1c653cff /src/library/scala/collection/mutable/DoubleLinkedList.scala | |
parent | 519214dcc68c941afb45ef6e749ec0afdb10af65 (diff) | |
download | scala-e2decb09ed9cbfad6e1c61b68e24423620d01ff3.tar.gz scala-e2decb09ed9cbfad6e1c61b68e24423620d01ff3.tar.bz2 scala-e2decb09ed9cbfad6e1c61b68e24423620d01ff3.zip |
More docs. No review.
Diffstat (limited to 'src/library/scala/collection/mutable/DoubleLinkedList.scala')
-rw-r--r-- | src/library/scala/collection/mutable/DoubleLinkedList.scala | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/DoubleLinkedList.scala b/src/library/scala/collection/mutable/DoubleLinkedList.scala index 718d6aa35d..d76ee7fa72 100644 --- a/src/library/scala/collection/mutable/DoubleLinkedList.scala +++ b/src/library/scala/collection/mutable/DoubleLinkedList.scala @@ -14,13 +14,29 @@ package mutable import generic._ -/** This class implements double linked lists where both the head (<code>elem</code>) - * and the tail (<code>next</code>) are mutable. +/** This class implements double linked lists where both the head (`elem`) + * and the tail (`next`) are mutable. * * @author Matthias Zenger * @author Martin Odersky * @version 2.8 * @since 1 + * + * @tparam A the type of the elements contained in this double linked list. + * + * @define Coll DoubleLinkedList + * @define coll double linked list + * @define thatinfo the class of the returned collection. In the standard library configuration, + * `That` is always `DoubleLinkedList[B]` because an implicit of type `CanBuildFrom[DoubleLinkedList, B, DoubleLinkedList[B]]` + * is defined in object `DoubleLinkedList`. + * @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 `DoubleLinkedList`. + * @define orderDependent + * @define orderDependentFold + * @define mayNotTerminateInf + * @define willNotTerminateInf */ @serializable @SerialVersionUID(-8144992287952814767L) class DoubleLinkedList[A]() extends LinearSeq[A] @@ -28,6 +44,11 @@ class DoubleLinkedList[A]() extends LinearSeq[A] with DoubleLinkedListLike[A, DoubleLinkedList[A]] { next = this + /** Creates a node for the double linked list. + * + * @param elem the element this node contains. + * @param next the next node in the double linked list. + */ def this(elem: A, next: DoubleLinkedList[A]) { this() if (next != null) { @@ -39,7 +60,12 @@ class DoubleLinkedList[A]() extends LinearSeq[A] override def companion: GenericCompanion[DoubleLinkedList] = DoubleLinkedList } +/** $factoryInfo + * @define coll double linked list + * @define Coll DoubleLinkedList + */ object DoubleLinkedList extends SeqFactory[DoubleLinkedList] { + /** $genericCanBuildFrom */ implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, DoubleLinkedList[A]] = new GenericCanBuildFrom[A] def newBuilder[A]: Builder[A, DoubleLinkedList[A]] = new Builder[A, DoubleLinkedList[A]] { |