diff options
author | Erik Rozendaal <erik@deler.org> | 2012-01-06 23:04:39 +0100 |
---|---|---|
committer | Erik Rozendaal <erik@deler.org> | 2012-01-06 23:04:39 +0100 |
commit | 7e92b3c60574d7fc0a0e83de738b835f4f98a685 (patch) | |
tree | 24d87b51f7fe739e079a35107bbf13230fcfea16 | |
parent | 388ff4716f9f4162165221c42fb2f2aa83e1063c (diff) | |
download | scala-7e92b3c60574d7fc0a0e83de738b835f4f98a685.tar.gz scala-7e92b3c60574d7fc0a0e83de738b835f4f98a685.tar.bz2 scala-7e92b3c60574d7fc0a0e83de738b835f4f98a685.zip |
Deprecate TreeMap.isSmaller and TreeSet.isSmaller.
These methods were used by the old RedBlack tree implementation,
but are no longer required and were not defined in any interface.
Use ordering or compare instead.
-rw-r--r-- | src/library/scala/collection/immutable/TreeMap.scala | 1 | ||||
-rw-r--r-- | src/library/scala/collection/immutable/TreeSet.scala | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/TreeMap.scala b/src/library/scala/collection/immutable/TreeMap.scala index 7e22c19e11..65e42ad061 100644 --- a/src/library/scala/collection/immutable/TreeMap.scala +++ b/src/library/scala/collection/immutable/TreeMap.scala @@ -53,6 +53,7 @@ class TreeMap[A, +B] private (tree: RedBlack.Tree[A, B])(implicit val ordering: import immutable.{RedBlack => RB} + @deprecated("use `ordering.lt` instead", "2.10") def isSmaller(x: A, y: A) = ordering.lt(x, y) override protected[this] def newBuilder : Builder[(A, B), TreeMap[A, B]] = diff --git a/src/library/scala/collection/immutable/TreeSet.scala b/src/library/scala/collection/immutable/TreeSet.scala index d36bc374c2..f7ceafdf8f 100644 --- a/src/library/scala/collection/immutable/TreeSet.scala +++ b/src/library/scala/collection/immutable/TreeSet.scala @@ -100,6 +100,7 @@ class TreeSet[A] private (tree: RedBlack.Tree[A, Unit])(implicit val ordering: O (take(n), drop(n)) } + @deprecated("use `ordering.lt` instead", "2.10") def isSmaller(x: A, y: A) = compare(x,y) < 0 def this()(implicit ordering: Ordering[A]) = this(null)(ordering) |