From 1caac54694602ad5ae48c3cbb8394b7263b132e4 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 29 Mar 2011 18:41:08 +0000 Subject: A bunch of scaladoc cleanups. the wrong places, tags saying the wrong thing. I sorted types and values so deprecated ones are at the end. I think they should be hidden by default, but this is a big improvement. Leaving #3914 open so they can be made invisible. No review. --- .../scala/tools/nsc/doc/html/page/Template.scala | 8 +++---- .../scala/tools/nsc/doc/model/Entity.scala | 15 +++++++++++- src/library/scala/collection/Parallel.scala | 10 -------- src/library/scala/collection/SetProxyLike.scala | 4 +--- src/library/scala/collection/SortedSet.scala | 3 --- .../scala/collection/generic/ParFactory.scala | 4 ++-- .../scala/collection/generic/ParMapFactory.scala | 9 ++------ src/library/scala/collection/immutable/List.scala | 2 +- src/library/scala/collection/immutable/Set.scala | 7 +++--- .../scala/collection/mutable/ArrayBuffer.scala | 2 +- .../scala/collection/mutable/ArraySeq.scala | 2 +- src/library/scala/collection/mutable/BitSet.scala | 2 +- .../collection/mutable/DoubleLinkedList.scala | 2 +- .../scala/collection/mutable/FlatHashTable.scala | 7 ++---- src/library/scala/collection/mutable/HashMap.scala | 2 +- src/library/scala/collection/mutable/HashSet.scala | 5 +--- .../scala/collection/mutable/LinkedHashMap.scala | 2 +- .../scala/collection/mutable/LinkedHashSet.scala | 2 +- .../scala/collection/mutable/LinkedList.scala | 2 +- .../scala/collection/mutable/ListBuffer.scala | 2 +- src/library/scala/collection/mutable/ListMap.scala | 2 +- src/library/scala/collection/mutable/Set.scala | 5 +++- .../scala/collection/mutable/UnrolledBuffer.scala | 11 ++------- .../scala/collection/mutable/WeakHashMap.scala | 2 +- .../parallel/mutable/ParFlatHashTable.scala | 11 +++------ .../collection/parallel/mutable/ParHashSet.scala | 27 +++------------------- src/library/scala/util/control/NoStackTrace.scala | 2 +- 27 files changed, 54 insertions(+), 98 deletions(-) diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index ac33e66a35..8b6564c27c 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -29,15 +29,15 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { val valueMembers = - (tpl.methods ::: tpl.values ::: (tpl.templates filter { tpl => tpl.isObject || tpl.isPackage })) sortBy (_.name) + tpl.methods ++ tpl.values ++ tpl.templates.filter(x => x.isObject || x.isPackage) sorted val typeMembers = - (tpl.abstractTypes ::: tpl.aliasTypes ::: (tpl.templates filter { tpl => tpl.isTrait || tpl.isClass })) sortBy (_.name) + tpl.abstractTypes ++ tpl.aliasTypes ++ tpl.templates.filter(x => x.isTrait || x.isClass) sorted val constructors = (tpl match { - case cls: Class => cls.constructors + case cls: Class => (cls.constructors: List[MemberEntity]).sorted case _ => Nil - }) sortBy (_.name) + }) /* for body, there is a special case for AnyRef, otherwise AnyRef appears like a package/object * this problem should be fixed, this implementation is just a patch diff --git a/src/compiler/scala/tools/nsc/doc/model/Entity.scala b/src/compiler/scala/tools/nsc/doc/model/Entity.scala index 37485bccab..4fb0341684 100644 --- a/src/compiler/scala/tools/nsc/doc/model/Entity.scala +++ b/src/compiler/scala/tools/nsc/doc/model/Entity.scala @@ -50,6 +50,15 @@ trait Entity { } +object Entity { + private def isDeprecated(x: Entity) = x match { + case x: MemberEntity => x.deprecation.isDefined + case _ => false + } + /** Ordering deprecated things last. */ + implicit lazy val EntityOrdering: Ordering[Entity] = + Ordering[(Boolean, String)] on (x => (isDeprecated(x), x.name)) +} /** A template, which is either a class, trait, object or package. Depending on whether documentation is available * or not, the template will be modeled as a [scala.tools.nsc.doc.model.NoDocTemplate] or a @@ -156,7 +165,11 @@ trait MemberEntity extends Entity { def isAbstract: Boolean } - +object MemberEntity { + // Oh contravariance, contravariance, wherefore art thou contravariance? + // Note: the above works for both the commonly misunderstood meaning of the line and the real one. + implicit lazy val MemberEntityOrdering: Ordering[MemberEntity] = Entity.EntityOrdering on (x => x) +} /** An entity that is parameterized by types */ trait HigherKinded extends Entity { diff --git a/src/library/scala/collection/Parallel.scala b/src/library/scala/collection/Parallel.scala index df77e5d1c7..037abde2b6 100644 --- a/src/library/scala/collection/Parallel.scala +++ b/src/library/scala/collection/Parallel.scala @@ -6,21 +6,11 @@ ** |/ ** \* */ - package scala.collection - - - - - /** A marker trait for objects with parallelised operations. * * @since 2.9 * @author prokopec */ trait Parallel - - - - diff --git a/src/library/scala/collection/SetProxyLike.scala b/src/library/scala/collection/SetProxyLike.scala index eaf67323b7..9308de45b0 100644 --- a/src/library/scala/collection/SetProxyLike.scala +++ b/src/library/scala/collection/SetProxyLike.scala @@ -19,10 +19,8 @@ import generic._ * @author Martin Odersky * @version 2.8 */ -trait SetProxyLike[A, +This <: SetLike[A, This] with Set[A]] extends SetLike[A, This] with IterableProxyLike[A, This] -{ +trait SetProxyLike[A, +This <: SetLike[A, This] with Set[A]] extends SetLike[A, This] with IterableProxyLike[A, This] { def empty: This - // def empty: This override def contains(elem: A): Boolean = self.contains(elem) override def + (elem: A) = self.+(elem) override def - (elem: A) = self.-(elem) diff --git a/src/library/scala/collection/SortedSet.scala b/src/library/scala/collection/SortedSet.scala index 46629b0cec..a1d1cd3fc3 100644 --- a/src/library/scala/collection/SortedSet.scala +++ b/src/library/scala/collection/SortedSet.scala @@ -29,6 +29,3 @@ object SortedSet extends SortedSetFactory[SortedSet] { def empty[A](implicit ord: Ordering[A]): immutable.SortedSet[A] = immutable.SortedSet.empty[A](ord) implicit def canBuildFrom[A](implicit ord: Ordering[A]): CanBuildFrom[Coll, A, SortedSet[A]] = new SortedSetCanBuildFrom[A] } - - - diff --git a/src/library/scala/collection/generic/ParFactory.scala b/src/library/scala/collection/generic/ParFactory.scala index a7ebb8c912..b4da60a133 100644 --- a/src/library/scala/collection/generic/ParFactory.scala +++ b/src/library/scala/collection/generic/ParFactory.scala @@ -9,8 +9,8 @@ import scala.collection.parallel.Combiner /** A template class for companion objects of `ParIterable` and subclasses thereof. * This class extends `TraversableFactory` and provides a set of operations to create `$Coll` objects. * - * @define $coll parallel collection - * @define $Coll ParIterable + * @define coll parallel collection + * @define Coll ParIterable */ abstract class ParFactory[CC[X] <: ParIterable[X] with GenericParTemplate[X, CC]] extends TraversableFactory[CC] diff --git a/src/library/scala/collection/generic/ParMapFactory.scala b/src/library/scala/collection/generic/ParMapFactory.scala index 2fba05c743..dda49e1354 100644 --- a/src/library/scala/collection/generic/ParMapFactory.scala +++ b/src/library/scala/collection/generic/ParMapFactory.scala @@ -1,20 +1,15 @@ package scala.collection.generic - - import scala.collection.parallel.ParMap import scala.collection.parallel.ParMapLike import scala.collection.parallel.Combiner import scala.collection.mutable.Builder - - - /** A template class for companion objects of `ParMap` and subclasses thereof. * This class extends `TraversableFactory` and provides a set of operations to create `$Coll` objects. * - * @define $coll parallel map - * @define $Coll ParMap + * @define coll parallel map + * @define Coll ParMap */ abstract class ParMapFactory[CC[X, Y] <: ParMap[X, Y] with ParMapLike[X, Y, CC[X, Y], _]] extends MapFactory[CC] diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index c46c487968..84b62e7e29 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -33,7 +33,7 @@ import annotation.tailrec * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `List[B]` because an implicit of type `CanBuildFrom[List, B, That]` * is defined in object `List`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `List`. diff --git a/src/library/scala/collection/immutable/Set.scala b/src/library/scala/collection/immutable/Set.scala index 7975134174..33bc50ab56 100644 --- a/src/library/scala/collection/immutable/Set.scala +++ b/src/library/scala/collection/immutable/Set.scala @@ -15,13 +15,12 @@ import generic._ import parallel.immutable.ParSet /** A generic trait for immutable sets. + * $setNote + * $setTags * - * $setnote - * + * @since 1.0 * @author Matthias Zenger * @author Martin Odersky - * @version 2.8 - * @since 1 * @define Coll immutable.Set * @define coll immutable set */ diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala index daa3c48578..7edbad6518 100644 --- a/src/library/scala/collection/mutable/ArrayBuffer.scala +++ b/src/library/scala/collection/mutable/ArrayBuffer.scala @@ -31,7 +31,7 @@ import parallel.mutable.ParArray * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `ArrayBuffer[B]` because an implicit of type `CanBuildFrom[ArrayBuffer, B, ArrayBuffer[B]]` * is defined in object `ArrayBuffer`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `ArrayBuffer`. diff --git a/src/library/scala/collection/mutable/ArraySeq.scala b/src/library/scala/collection/mutable/ArraySeq.scala index 0b3f0ebc5b..b6cafbb677 100644 --- a/src/library/scala/collection/mutable/ArraySeq.scala +++ b/src/library/scala/collection/mutable/ArraySeq.scala @@ -30,7 +30,7 @@ import parallel.mutable.ParArray * @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, ArraySeq[B]]` * is defined in object `ArraySeq`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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`. diff --git a/src/library/scala/collection/mutable/BitSet.scala b/src/library/scala/collection/mutable/BitSet.scala index 4735d58e33..a547e8a17e 100644 --- a/src/library/scala/collection/mutable/BitSet.scala +++ b/src/library/scala/collection/mutable/BitSet.scala @@ -23,7 +23,7 @@ import BitSetLike.{LogWL, updateArray} * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `BitSet[B]` because an implicit of type `CanBuildFrom[BitSet, B, BitSet]` * is defined in object `BitSet`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `BitSet`. diff --git a/src/library/scala/collection/mutable/DoubleLinkedList.scala b/src/library/scala/collection/mutable/DoubleLinkedList.scala index 4465ebef93..9dc5ee0f20 100644 --- a/src/library/scala/collection/mutable/DoubleLinkedList.scala +++ b/src/library/scala/collection/mutable/DoubleLinkedList.scala @@ -28,7 +28,7 @@ import generic._ * @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 + * @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`. diff --git a/src/library/scala/collection/mutable/FlatHashTable.scala b/src/library/scala/collection/mutable/FlatHashTable.scala index 48386c8034..d78c466f69 100644 --- a/src/library/scala/collection/mutable/FlatHashTable.scala +++ b/src/library/scala/collection/mutable/FlatHashTable.scala @@ -16,13 +16,10 @@ package mutable * This trait is used internally. It can be mixed in with various collections relying on * hash table as an implementation. * - * @coll flat hash table - * + * @define coll flat hash table * @define cannotStoreNull '''Note''': A $coll cannot store `null` elements. - * * @since 2.3 - * - * @tparam A the type of the elements contained in the flat hash table. + * @tparam A the type of the elements contained in the $coll. */ trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] { import FlatHashTable._ diff --git a/src/library/scala/collection/mutable/HashMap.scala b/src/library/scala/collection/mutable/HashMap.scala index e78e9a1296..19ad53faf5 100644 --- a/src/library/scala/collection/mutable/HashMap.scala +++ b/src/library/scala/collection/mutable/HashMap.scala @@ -32,7 +32,7 @@ import scala.collection.parallel.mutable.ParHashMap * pairs of type `(A, B)`. This is because an implicit of type `CanBuildFrom[HashMap, (A, B), HashMap[A, B]]` * is defined in object `HashMap`. Otherwise, `That` resolves to the most specific type that doesn't have * to contain pairs of type `(A, B)`, which is `Iterable`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `HashMap`. diff --git a/src/library/scala/collection/mutable/HashSet.scala b/src/library/scala/collection/mutable/HashSet.scala index 2ba5065964..134558ad15 100644 --- a/src/library/scala/collection/mutable/HashSet.scala +++ b/src/library/scala/collection/mutable/HashSet.scala @@ -23,15 +23,12 @@ import collection.parallel.mutable.ParHashSet * @version 2.0, 31/12/2006 * @since 1 * - * @tparam A the type of the elements contained in this set. - * - * * @define Coll mutable.HashSet * @define coll mutable hash set * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `HashSet[B]` because an implicit of type `CanBuildFrom[HashSet, B, HashSet[B]]` * is defined in object `HashSet`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `HashSet`. diff --git a/src/library/scala/collection/mutable/LinkedHashMap.scala b/src/library/scala/collection/mutable/LinkedHashMap.scala index 6df68b6e6e..31f539cc09 100644 --- a/src/library/scala/collection/mutable/LinkedHashMap.scala +++ b/src/library/scala/collection/mutable/LinkedHashMap.scala @@ -35,7 +35,7 @@ object LinkedHashMap extends MutableMapFactory[LinkedHashMap] { * pairs of type `(A, B)`. This is because an implicit of type `CanBuildFrom[LinkedHashMap, (A, B), LinkedHashMap[A, B]]` * is defined in object `LinkedHashMap`. Otherwise, `That` resolves to the most specific type that doesn't have * to contain pairs of type `(A, B)`, which is `Iterable`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `LinkedHashMap`. diff --git a/src/library/scala/collection/mutable/LinkedHashSet.scala b/src/library/scala/collection/mutable/LinkedHashSet.scala index bdbd22286a..7a1e695f32 100644 --- a/src/library/scala/collection/mutable/LinkedHashSet.scala +++ b/src/library/scala/collection/mutable/LinkedHashSet.scala @@ -29,7 +29,7 @@ import generic._ * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `LinkedHashSet[B]` because an implicit of type `CanBuildFrom[LinkedHashSet, B, LinkedHashSet[B]]` * is defined in object `LinkedHashSet`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `LinkedHashSet`. diff --git a/src/library/scala/collection/mutable/LinkedList.scala b/src/library/scala/collection/mutable/LinkedList.scala index 6c5bf9ae49..b701a42596 100644 --- a/src/library/scala/collection/mutable/LinkedList.scala +++ b/src/library/scala/collection/mutable/LinkedList.scala @@ -28,7 +28,7 @@ import generic._ * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `LinkedList[B]` because an implicit of type `CanBuildFrom[LinkedList, B, LinkedList[B]]` * is defined in object `LinkedList`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `LinkedList`. diff --git a/src/library/scala/collection/mutable/ListBuffer.scala b/src/library/scala/collection/mutable/ListBuffer.scala index 67d34cb481..6a75108dfb 100644 --- a/src/library/scala/collection/mutable/ListBuffer.scala +++ b/src/library/scala/collection/mutable/ListBuffer.scala @@ -29,7 +29,7 @@ import immutable.{List, Nil, ::} * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `ListBuffer[B]` because an implicit of type `CanBuildFrom[ListBuffer, B, ListBuffer[B]]` * is defined in object `ListBuffer`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `ListBuffer`. diff --git a/src/library/scala/collection/mutable/ListMap.scala b/src/library/scala/collection/mutable/ListMap.scala index 37baea60c2..c02593fdf3 100644 --- a/src/library/scala/collection/mutable/ListMap.scala +++ b/src/library/scala/collection/mutable/ListMap.scala @@ -25,7 +25,7 @@ import generic._ * pairs of type `(A, B)`. This is because an implicit of type `CanBuildFrom[ListMap, (A, B), ListMap[A, B]]` * is defined in object `ListMap`. Otherwise, `That` resolves to the most specific type that doesn't have * to contain pairs of type `(A, B)`, which is `Iterable`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `ListMap`. diff --git a/src/library/scala/collection/mutable/Set.scala b/src/library/scala/collection/mutable/Set.scala index 8d0588e5b9..dba629ae67 100644 --- a/src/library/scala/collection/mutable/Set.scala +++ b/src/library/scala/collection/mutable/Set.scala @@ -13,11 +13,14 @@ package mutable import generic._ -/** A base trait for sets that can be mutated. +/** A generic trait for mutable sets. * $setNote * $setTags + * * @since 1.0 * @author Matthias Zenger + * @define Coll mutable.Set + * @define coll mutable set */ trait Set[A] extends Iterable[A] with scala.collection.Set[A] diff --git a/src/library/scala/collection/mutable/UnrolledBuffer.scala b/src/library/scala/collection/mutable/UnrolledBuffer.scala index 10a572408b..0933aeaf69 100644 --- a/src/library/scala/collection/mutable/UnrolledBuffer.scala +++ b/src/library/scala/collection/mutable/UnrolledBuffer.scala @@ -1,15 +1,8 @@ package scala.collection.mutable - - import collection.generic._ - import annotation.tailrec - - - - /** A buffer that stores elements in an unrolled linked list. * * Unrolled linked lists store elements in linked fixed size @@ -32,10 +25,10 @@ import annotation.tailrec * Better than singly linked lists for random access, but * should still be avoided for such a purpose. * + * @define coll unrolled buffer + * @define Coll UnrolledBuffer * @author Aleksandar Prokopec * - * @coll unrolled buffer - * @Coll UnrolledBuffer */ @SerialVersionUID(1L) class UnrolledBuffer[T](implicit val manifest: ClassManifest[T]) diff --git a/src/library/scala/collection/mutable/WeakHashMap.scala b/src/library/scala/collection/mutable/WeakHashMap.scala index 3e6366dbd0..be2daa05ce 100644 --- a/src/library/scala/collection/mutable/WeakHashMap.scala +++ b/src/library/scala/collection/mutable/WeakHashMap.scala @@ -30,7 +30,7 @@ import generic._ * pairs of type `(A, B)`. This is because an implicit of type `CanBuildFrom[WeakHashMap, (A, B), WeakHashMap[A, B]]` * is defined in object `WeakHashMap`. Otherwise, `That` resolves to the most specific type that doesn't have * to contain pairs of type `(A, B)`, which is `Iterable`. - * @define $bfinfo an implicit value of class `CanBuildFrom` which determines the + * @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 `WeakHashMap`. diff --git a/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala b/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala index 3bb3d4d763..f2205fbb17 100644 --- a/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala +++ b/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala @@ -6,21 +6,16 @@ ** |/ ** \* */ - package scala.collection package parallel.mutable - - - import collection.parallel.ParIterableIterator - - - /** Parallel flat hash table. * - * @tparam T type of the elements in the table + * @tparam T type of the elements in the $coll. + * @define coll table + * @define Coll flat hash table * * @author Aleksandar Prokopec */ diff --git a/src/library/scala/collection/parallel/mutable/ParHashSet.scala b/src/library/scala/collection/parallel/mutable/ParHashSet.scala index 0b969d1cf0..6d82e1b6aa 100644 --- a/src/library/scala/collection/parallel/mutable/ParHashSet.scala +++ b/src/library/scala/collection/parallel/mutable/ParHashSet.scala @@ -6,12 +6,8 @@ ** |/ ** \* */ - package scala.collection.parallel.mutable - - - import collection.generic._ import collection.mutable.HashSet import collection.mutable.FlatHashTable @@ -19,18 +15,15 @@ import collection.parallel.Combiner import collection.parallel.EnvironmentPassingCombiner import collection.mutable.UnrolledBuffer - - - /** A parallel hash set. * * `ParHashSet` is a parallel set which internally keeps elements within a hash table. * It uses linear probing to resolve collisions. * - * @tparam T type of the elements in the parallel hash map + * @tparam T type of the elements in the $coll. * - * @define Coll ParHashMap - * @define coll parallel hash map + * @define Coll ParHashSet + * @define coll parallel hash set * * @author Aleksandar Prokopec */ @@ -317,7 +310,6 @@ self: EnvironmentPassingCombiner[T, ParHashSet[T]] => } - private[parallel] object ParHashSetCombiner { private[mutable] val discriminantbits = 5 private[mutable] val numblocks = 1 << discriminantbits @@ -327,16 +319,3 @@ private[parallel] object ParHashSetCombiner { def apply[T] = new ParHashSetCombiner[T](FlatHashTable.defaultLoadFactor) with EnvironmentPassingCombiner[T, ParHashSet[T]] } - - - - - - - - - - - - - diff --git a/src/library/scala/util/control/NoStackTrace.scala b/src/library/scala/util/control/NoStackTrace.scala index f33e8cd013..f5a844d2c9 100644 --- a/src/library/scala/util/control/NoStackTrace.scala +++ b/src/library/scala/util/control/NoStackTrace.scala @@ -11,7 +11,7 @@ package scala.util.control /** A trait for exceptions which, for efficiency reasons, do not * fill in the stack trace. Stack trace suppression can be disabled * on a global basis via a system property wrapper in - * [[ scala.sys.SystemProperties ]]. + * [[scala.sys.SystemProperties]]. * * @author Paul Phillips * @since 2.8 -- cgit v1.2.3