From e182625e5108e7f78751200317c82702d95cfbd9 Mon Sep 17 00:00:00 2001 From: michelou Date: Fri, 8 Jun 2007 12:18:04 +0000 Subject: minor changes --- src/library/scala/runtime/RichInt.scala | 8 +++++--- src/library/scala/runtime/RichShort.scala | 6 +++--- src/library/scala/runtime/RichString.scala | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/library/scala/runtime/RichInt.scala b/src/library/scala/runtime/RichInt.scala index 31e3778a96..f2fd48810a 100644 --- a/src/library/scala/runtime/RichInt.scala +++ b/src/library/scala/runtime/RichInt.scala @@ -16,14 +16,16 @@ final class RichInt(start: Int) extends Proxy with Ordered[Int] { def self: Any = start // Ordered[Int] - def compare (that: Int): Int = if (start < that) -1 else if (start > that) 1 else 0 + def compare(that: Int): Int = if (start < that) -1 else if (start > that) 1 else 0 /** See Iterator.range. */ def until(end: Int): Range = Iterator.range(start, end) + /** See Iterator.range. */ - def until(end : Int, step : Int) : Range = Iterator.range(start, end, step) + def until(end: Int, step: Int): Range = Iterator.range(start, end, step) + /** like until, but includes the last index */ - def to(end : Int) = until(end + 1) + def to(end: Int) = until(end + 1) def min(that: Int): Int = if (start < that) start else that def max(that: Int): Int = if (start > that) start else that diff --git a/src/library/scala/runtime/RichShort.scala b/src/library/scala/runtime/RichShort.scala index 4615dec610..c9e3a120f7 100644 --- a/src/library/scala/runtime/RichShort.scala +++ b/src/library/scala/runtime/RichShort.scala @@ -1,7 +1,7 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** +** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** \* */ @@ -18,6 +18,6 @@ final class RichShort(x: Short) extends Proxy with Ordered[Short] { def self: Any = x // Ordered[Short].compare - def compare (y: Short): Int = if (x < y) -1 else if (x > y) 1 else 0 + def compare(y: Short): Int = if (x < y) -1 else if (x > y) 1 else 0 } diff --git a/src/library/scala/runtime/RichString.scala b/src/library/scala/runtime/RichString.scala index 17acf97ff1..83751dab5a 100644 --- a/src/library/scala/runtime/RichString.scala +++ b/src/library/scala/runtime/RichString.scala @@ -83,8 +83,8 @@ final class RichString(val self: String) extends Proxy with Seq[Char] with Order def next(): String = { if (index >= len) throw new NoSuchElementException("next on empty iterator") val start = index - while (index < len && !isLineBreak(apply(index))) index = index + 1 - index = index + 1 + while (index < len && !isLineBreak(apply(index))) index += 1 + index += 1 self.substring(start, index min len) } } @@ -116,7 +116,7 @@ final class RichString(val self: String) extends Proxy with Seq[Char] with Order for (line <- linesWithSeparators) { val len = line.length var index = 0; - while (index < len && line.charAt(index) <= ' ') index = index + 1 + while (index < len && line.charAt(index) <= ' ') index += 1 buf append (if (index < len && line.charAt(index) == marginChar) line.substring(index + 1) else line) } -- cgit v1.2.3