diff options
author | Martin Odersky <odersky@gmail.com> | 2010-04-13 17:36:21 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-04-13 17:36:21 +0000 |
commit | e20c986ba1668abd5f561095aa64cf153cd48227 (patch) | |
tree | 6d77d7aa3d537f76dcf985bdbf46172ea369ec5e /src/library/scala/collection/Set.scala | |
parent | 174c1721ff3b1b581142ad0ed80a655d2d0b4aba (diff) | |
download | scala-e20c986ba1668abd5f561095aa64cf153cd48227.tar.gz scala-e20c986ba1668abd5f561095aa64cf153cd48227.tar.bz2 scala-e20c986ba1668abd5f561095aa64cf153cd48227.zip |
more documentation
Diffstat (limited to 'src/library/scala/collection/Set.scala')
-rw-r--r-- | src/library/scala/collection/Set.scala | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/library/scala/collection/Set.scala b/src/library/scala/collection/Set.scala index 3a6313a187..034d9f1705 100644 --- a/src/library/scala/collection/Set.scala +++ b/src/library/scala/collection/Set.scala @@ -12,14 +12,16 @@ package scala.collection import generic._ -/** <p> - * A set is a collection that includes at most one of any object. - * </p> +/** A base trait for all sets, mutable as well as immutable. * - * @author Matthias Zenger - * @author Martin Odersky - * @version 2.8 - * @since 1 + * $setNote + * $setNote2 + * $setTags + * @since 1.0 + * @author Matthias Zenger + * @define setNote2 + * '''Implementation note:''' If your additions and mutations return the same kind of set as the set + * you are defining, you should inherit from `SetLike` as well. */ trait Set[A] extends (A => Boolean) with Iterable[A] @@ -28,11 +30,11 @@ trait Set[A] extends (A => Boolean) override def companion: GenericCompanion[Set] = Set } -/** Factory object for <code>Set</code> class. - * - * @author Martin Odersky - * @version 2.8 - * @since 2.8 +/** $factoryInfo + * The current default implementation of a $Coll is one of `EmptySet`, `Set1`, `Set2`, `Set3`, `Set4` in + * class `immutable.Set` for sets of sizes up to 4, and a `immutable.HashSet` for sets of larger sizes. + * @define coll set + * @define Coll Set */ object Set extends SetFactory[Set] { override def empty[A]: Set[A] = immutable.Set.empty[A] |