diff options
author | Paul Phillips <paulp@improving.org> | 2009-06-24 15:19:09 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-06-24 15:19:09 +0000 |
commit | 1c9870541fb22ac032edaa0be0103cc1aa2c99b4 (patch) | |
tree | 881d38aa5dfba0542295e7e56e642a77cd3852b6 /src/dotnet-library | |
parent | 6ab1f0b7710af132401848bc25da9101a364093b (diff) | |
download | scala-1c9870541fb22ac032edaa0be0103cc1aa2c99b4.tar.gz scala-1c9870541fb22ac032edaa0be0103cc1aa2c99b4.tar.bz2 scala-1c9870541fb22ac032edaa0be0103cc1aa2c99b4.zip |
More work and documentation for GenericRanges, ...
More work and documentation for GenericRanges, plus minor findbugs
noticed issues.
Diffstat (limited to 'src/dotnet-library')
-rw-r--r-- | src/dotnet-library/scala/runtime/RichChar.scala | 2 | ||||
-rw-r--r-- | src/dotnet-library/scala/runtime/RichInt.scala | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/dotnet-library/scala/runtime/RichChar.scala b/src/dotnet-library/scala/runtime/RichChar.scala index 5c88cce137..7c6e3f6791 100644 --- a/src/dotnet-library/scala/runtime/RichChar.scala +++ b/src/dotnet-library/scala/runtime/RichChar.scala @@ -67,7 +67,7 @@ final class RichChar(x: Char) extends Proxy with Ordered[Char] { } } - /** Create a <code>RandomAccessSeq.Projection[Char]</code> over the characters from 'x' to 'y' + /** Create a <code>VectorView[Char]</code> over the characters from 'x' to 'y' */ def to(y: Char): VectorView[Char, Vector[Char]] = until((y + 1).toChar) diff --git a/src/dotnet-library/scala/runtime/RichInt.scala b/src/dotnet-library/scala/runtime/RichInt.scala index 3ebfc12a89..390188c139 100644 --- a/src/dotnet-library/scala/runtime/RichInt.scala +++ b/src/dotnet-library/scala/runtime/RichInt.scala @@ -21,13 +21,10 @@ final class RichInt(val start: Int) extends Proxy with Ordered[Int] { def compare(that: Int): Int = if (start < that) -1 else if (start > that) 1 else 0 /** See <code>Iterator.range</code>. */ - def until(end: Int): Range = new Range(start, end, 1) - - /** See <code>Iterator.range</code>. */ - def until(end: Int, step: Int): Range = new Range(start, end, step) + def until(end: Int, step: Int = 1): Range = new Range(start, end, step) /** like <code>until</code>, but includes the last index */ - def to(end: Int) = Range.inclusive(start, end, 1) + def to(end: Int, step: Int = 1) = Range.inclusive(start, end, step) def min(that: Int): Int = if (start < that) start else that def max(that: Int): Int = if (start > that) start else that |