summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-11-18 02:03:26 +0000
committermichelou <michelou@epfl.ch>2007-11-18 02:03:26 +0000
commite1f5fa089bb1d1196f4c2fc4ec3780da2865f6f9 (patch)
tree1656c58ebf1dc7885b299e73098232dcbfc27f4b /src/library
parent78940081aba843f7ed5299564046130d2806efc1 (diff)
downloadscala-e1f5fa089bb1d1196f4c2fc4ec3780da2865f6f9.tar.gz
scala-e1f5fa089bb1d1196f4c2fc4ec3780da2865f6f9.tar.bz2
scala-e1f5fa089bb1d1196f4c2fc4ec3780da2865f6f9.zip
fixed #176 (CLDC build)
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/Array.scala8
-rw-r--r--src/library/scala/Predef.scala4
-rw-r--r--src/library/scala/compat/StringBuilder.scala2
-rw-r--r--src/library/scala/runtime/BoxedObjectArray.scala4
-rw-r--r--src/library/scala/runtime/RichString.scala3
5 files changed, 11 insertions, 10 deletions
diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala
index 47fa03f6ff..2dbeebb1ba 100644
--- a/src/library/scala/Array.scala
+++ b/src/library/scala/Array.scala
@@ -190,12 +190,14 @@ object Array {
override def from = from0
override def until = until0
override def underlying = Projection.this
- override protected def newArray[B >: A](length : Int, elements : Iterator[A]) = underlying.newArray(length, elements)
+ override protected def newArray[B >: A](length : Int, elements : Iterator[A]) =
+ underlying.newArray(length, elements)
override def slice(from0 : Int, until0 : Int) =
Projection.this.slice(from + from0, from + until0)
}
override def reverse : Projection[A] = new Projection[A] {
- override protected def newArray[B >: A](length : Int, elements : Iterator[A]) = Projection.this.newArray(length, elements)
+ override protected def newArray[B >: A](length : Int, elements : Iterator[A]) =
+ Projection.this.newArray(length, elements)
def update(idx : Int, what : A) : Unit = Projection.this.update(length - idx - 1, what)
def length = Projection.this.length
def apply(idx : Int) = Projection.this.apply(length - idx - 1)
@@ -312,8 +314,6 @@ final class Array[A](_length: Int) extends Array.Array0[A] {
/** @deprecated use <code>slice(from,end).force</code> instead */
def subArray(from: Int, end: Int): Array[A] = throw new Error()
-
-
/** Returns an array consisting of all elements of this array that satisfy the
* predicate <code>p</code>. The order of the elements is preserved.
*
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 31ed2f1da5..d099fbe8b0 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -315,9 +315,9 @@ object Predef {
implicit def boolean2Boolean(x: Boolean) = java.lang.Boolean.valueOf(x)
/** any array projection can be automatically converted into an array */
- implicit def forceArrayProjection[A](x : Array.Projection[A]) : Array[A] = x.force
+ implicit def forceArrayProjection[A](x: Array.Projection[A]): Array[A] = x.force
/** any random access character seq (including rich string can be converted into a string */
- implicit def forceRandomAccessCharSeq(x : runtime.RichString) : String = x.mkString
+ implicit def forceRandomAccessCharSeq(x: runtime.RichString): String = x.mkString
def currentThread = java.lang.Thread.currentThread()
diff --git a/src/library/scala/compat/StringBuilder.scala b/src/library/scala/compat/StringBuilder.scala
index 98e9918c8e..7345153f12 100644
--- a/src/library/scala/compat/StringBuilder.scala
+++ b/src/library/scala/compat/StringBuilder.scala
@@ -33,7 +33,7 @@ final class StringBuilder(val self: StringBuffer) extends (Int => Char) with Pro
def charAt(i: Int): Char = self.charAt(i)
def apply(i: Int): Char = self.charAt(i)
- def deleteCharAt(index : Int) = self.deleteCharAt(index)
+ def deleteCharAt(index: Int) = self.deleteCharAt(index)
def setCharAt(index: Int, c: Char) { self.setCharAt(index, c) }
def update(i: Int, c: Char) { self.setCharAt(i, c)}
diff --git a/src/library/scala/runtime/BoxedObjectArray.scala b/src/library/scala/runtime/BoxedObjectArray.scala
index 4eaec78c55..cc91ab7dba 100644
--- a/src/library/scala/runtime/BoxedObjectArray.scala
+++ b/src/library/scala/runtime/BoxedObjectArray.scala
@@ -62,9 +62,11 @@ final class BoxedObjectArray(val value: Array[AnyRef]) extends BoxedArray {
}
new BoxedObjectArray(result)
}
- override protected def newArray(length : Int, elements : Iterator[Any]) = {
+
+ override protected def newArray(length: Int, elements: Iterator[Any]) = {
val result = create(length)
elements.map(_.asInstanceOf[AnyRef]).copyToArray(result, 0)
new BoxedObjectArray(result)
}
}
+
diff --git a/src/library/scala/runtime/RichString.scala b/src/library/scala/runtime/RichString.scala
index 40fccab5ba..911a392bcd 100644
--- a/src/library/scala/runtime/RichString.scala
+++ b/src/library/scala/runtime/RichString.scala
@@ -66,7 +66,6 @@ final class RichString(val self: String) extends Proxy with RandomAccessSeq[Char
override def compare(other: String) = self compareTo other
-
private def isLineBreak(c: Char) = c == LF || c == FF
/** <p>
@@ -186,6 +185,7 @@ final class RichString(val self: String) extends Proxy with RandomAccessSeq[Char
def toFloat: Float = java.lang.Float.parseFloat(self)
def toDouble: Double = java.lang.Double.parseDouble(self)
}
+
object RichString {
// just statics for rich string.
private final val LF: Char = 0x0A
@@ -194,4 +194,3 @@ object RichString {
private final val SU: Char = 0x1A
}
-