diff options
author | David MacIver <david.maciver@gmail.com> | 2009-06-01 11:43:48 +0000 |
---|---|---|
committer | David MacIver <david.maciver@gmail.com> | 2009-06-01 11:43:48 +0000 |
commit | 289970ec7f8673dbf9999d9c83bbd7c15aa15629 (patch) | |
tree | fa7dcd6caf0b36c240b005c2fe1325f2c00b93d3 /src | |
parent | cdda313b4010409537c61f6d2a92cf6957e2dd2c (diff) | |
download | scala-289970ec7f8673dbf9999d9c83bbd7c15aa15629.tar.gz scala-289970ec7f8673dbf9999d9c83bbd7c15aa15629.tar.bz2 scala-289970ec7f8673dbf9999d9c83bbd7c15aa15629.zip |
toString for TreeSet. Documentation cleanup.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/generic/ImmutableSortedMapFactory.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/immutable/TreeSet.scala | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/collection/generic/ImmutableSortedMapFactory.scala b/src/library/scala/collection/generic/ImmutableSortedMapFactory.scala index 47e767974a..1662abd901 100644 --- a/src/library/scala/collection/generic/ImmutableSortedMapFactory.scala +++ b/src/library/scala/collection/generic/ImmutableSortedMapFactory.scala @@ -1,6 +1,6 @@ package scala.collection.generic -/** A template for companion objects of mutable.Map and subclasses thereof. +/** A template for companion objects of immutable.Map and subclasses thereof. */ abstract class ImmutableSortedMapFactory[CC[A, B] <: immutable.SortedMap[A, B] with SortedMapTemplate[A, B, CC[A, B]]] extends SortedMapFactory[CC] { diff --git a/src/library/scala/collection/immutable/TreeSet.scala b/src/library/scala/collection/immutable/TreeSet.scala index 87d0042fdb..ddddf7bab0 100644 --- a/src/library/scala/collection/immutable/TreeSet.scala +++ b/src/library/scala/collection/immutable/TreeSet.scala @@ -39,6 +39,8 @@ object TreeSet { class TreeSet[A](override val size: Int, t: RedBlack[A]#Tree[Unit])(implicit val ordering : Ordering[A]) extends RedBlack[A] with SortedSet[A] with SortedSetTemplate[A, TreeSet[A]] { + override def stringPrefix = "TreeSet" + def isSmaller(x: A, y: A) = compare(x,y) < 0 def this()(implicit ordering : Ordering[A]) = this(0, null)(ordering) @@ -94,5 +96,4 @@ class TreeSet[A](override val size: Int, t: RedBlack[A]#Tree[Unit])(implicit val } override def firstKey = tree.first override def lastKey = tree.last - override def compare(a0: A, a1: A) = ordering.compare(a0, a1); } |