diff options
author | mihaylov <mihaylov@epfl.ch> | 2006-01-26 17:33:39 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2006-01-26 17:33:39 +0000 |
commit | c57219d240fd3188bf1c4c2edd7af9c3d31c18ce (patch) | |
tree | c6846ed234039b3183f43a4676b501a6e92be6b9 /src/library/scala/collection/immutable/BitSet.scala | |
parent | a5cffcb68756539a66ca9d604f79bb6cbe93b313 (diff) | |
download | scala-c57219d240fd3188bf1c4c2edd7af9c3d31c18ce.tar.gz scala-c57219d240fd3188bf1c4c2edd7af9c3d31c18ce.tar.bz2 scala-c57219d240fd3188bf1c4c2edd7af9c3d31c18ce.zip |
Move the implicit BitSet=>Ordered[BitSet] coerc...
Move the implicit BitSet=>Ordered[BitSet] coercion to
automata/SubsetConstruction, where it is used
Diffstat (limited to 'src/library/scala/collection/immutable/BitSet.scala')
-rw-r--r-- | src/library/scala/collection/immutable/BitSet.scala | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/library/scala/collection/immutable/BitSet.scala b/src/library/scala/collection/immutable/BitSet.scala index 8e1f28b83c..cc99f4fecd 100644 --- a/src/library/scala/collection/immutable/BitSet.scala +++ b/src/library/scala/collection/immutable/BitSet.scala @@ -38,36 +38,3 @@ class BitSet(val size: Int, val capacity: Int, ba: Array[Int], copy: Boolean) ba; } - -object BitSet { - implicit def toOrdered(bs: BitSet): Ordered[BitSet] = new Ordered[BitSet] { - def compareTo [b >: BitSet <% Ordered[b]](other: b): Int = other match { - case that: BitSet => { - val it1 = bs.elements; - val it2 = that.elements; - var res = 0; - while((0 == res) && it1.hasNext) { - while((0 == res) && it2.hasNext) { - if (!it1.hasNext) - res = -1 - else { - val i1 = it1.next; - val i2 = it2.next; - if (i1 < i2) - res = -1 - else if (i1 > i2) - res = 1 - } - } - if (it1.hasNext) - res = 1 - } - if (it2.hasNext) - res = -1; - res - } - - //case _ => -(other.compareTo(this)) - } - } -} |