diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-05-07 22:35:11 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-05-07 22:35:11 +0000 |
commit | 9a0804557c304c3bdb8874c9fb1e2164958fe4ec (patch) | |
tree | 10b7f974456bd00b281957cdf3c5e967acdf1e3e /src/library | |
parent | 5be9ee030535a806c3f2467d8af1962b4131062a (diff) | |
download | scala-9a0804557c304c3bdb8874c9fb1e2164958fe4ec.tar.gz scala-9a0804557c304c3bdb8874c9fb1e2164958fe4ec.tar.bz2 scala-9a0804557c304c3bdb8874c9fb1e2164958fe4ec.zip |
Reverted to the Int.{box,unbox}, etc way of box...
Reverted to the Int.{box,unbox}, etc way of box/unbox representation
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/runtime/BoxedAnyArray.scala | 48 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedBooleanArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedByteArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedCharArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedDoubleArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedFloatArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedIntArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedLongArray.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedShortArray.scala | 4 |
9 files changed, 40 insertions, 40 deletions
diff --git a/src/library/scala/runtime/BoxedAnyArray.scala b/src/library/scala/runtime/BoxedAnyArray.scala index d6093fe027..34cf4b3776 100644 --- a/src/library/scala/runtime/BoxedAnyArray.scala +++ b/src/library/scala/runtime/BoxedAnyArray.scala @@ -31,21 +31,21 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { if (unboxed eq null) boxed(index); else if (elemClass eq classOf[Int]) - BoxesUtility.boxToInteger(unboxed.asInstanceOf[Array[Int]](index)) + Int.box(unboxed.asInstanceOf[Array[Int]](index)) else if (elemClass eq classOf[Double]) - BoxesUtility.boxToDouble(unboxed.asInstanceOf[Array[Double]](index)) + Double.box(unboxed.asInstanceOf[Array[Double]](index)) else if (elemClass eq classOf[Float]) - BoxesUtility.boxToFloat(unboxed.asInstanceOf[Array[Float]](index)) + Float.box(unboxed.asInstanceOf[Array[Float]](index)) else if (elemClass eq classOf[Long]) - BoxesUtility.boxToLong(unboxed.asInstanceOf[Array[Long]](index)) + Long.box(unboxed.asInstanceOf[Array[Long]](index)) else if (elemClass eq classOf[Char]) - BoxesUtility.boxToCharacter(unboxed.asInstanceOf[Array[Char]](index)) + Char.box(unboxed.asInstanceOf[Array[Char]](index)) else if (elemClass eq classOf[Byte]) - BoxesUtility.boxToByte(unboxed.asInstanceOf[Array[Byte]](index)) + Byte.box(unboxed.asInstanceOf[Array[Byte]](index)) else if (elemClass eq classOf[Short]) - BoxesUtility.boxToShort(unboxed.asInstanceOf[Array[Short]](index)) + Short.box(unboxed.asInstanceOf[Array[Short]](index)) else if (elemClass eq classOf[Boolean]) - BoxesUtility.boxToBoolean(unboxed.asInstanceOf[Array[Boolean]](index)) + Boolean.box(unboxed.asInstanceOf[Array[Boolean]](index)) else unboxed.asInstanceOf[Array[AnyRef]](index) } @@ -55,21 +55,21 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { if (unboxed eq null) boxed(index) = elem else if (elemClass eq classOf[Int]) - unboxed.asInstanceOf[Array[Int]](index) = BoxesUtility.unboxToInt(elem) + unboxed.asInstanceOf[Array[Int]](index) = Int.unbox(elem) else if (elemClass eq classOf[Double]) - unboxed.asInstanceOf[Array[Double]](index) = BoxesUtility.unboxToDouble(elem) + unboxed.asInstanceOf[Array[Double]](index) = Double.unbox(elem) else if (elemClass eq classOf[Float]) - unboxed.asInstanceOf[Array[Float]](index) = BoxesUtility.unboxToFloat(elem) + unboxed.asInstanceOf[Array[Float]](index) = Float.unbox(elem) else if (elemClass eq classOf[Long]) - unboxed.asInstanceOf[Array[Long]](index) = BoxesUtility.unboxToLong(elem) + unboxed.asInstanceOf[Array[Long]](index) = Long.unbox(elem) else if (elemClass eq classOf[Char]) - unboxed.asInstanceOf[Array[Char]](index) = BoxesUtility.unboxToChar(elem) + unboxed.asInstanceOf[Array[Char]](index) = Char.unbox(elem) else if (elemClass eq classOf[Byte]) - unboxed.asInstanceOf[Array[Byte]](index) = BoxesUtility.unboxToByte(elem) + unboxed.asInstanceOf[Array[Byte]](index) = Byte.unbox(elem) else if (elemClass eq classOf[Short]) - unboxed.asInstanceOf[Array[Short]](index) = BoxesUtility.unboxToShort(elem) + unboxed.asInstanceOf[Array[Short]](index) = Short.unbox(elem) else if (elemClass eq classOf[Boolean]) - unboxed.asInstanceOf[Array[Boolean]](index) = BoxesUtility.unboxToBoolean(elem) + unboxed.asInstanceOf[Array[Boolean]](index) = Boolean.unbox(elem) else unboxed.asInstanceOf[Array[AnyRef]](index) = elem } @@ -92,7 +92,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Int](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToInt(boxed(i)) + newvalue(i) = Int.unbox(boxed(i)) i = i + 1 } unboxed = newvalue @@ -100,7 +100,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Double](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToDouble(boxed(i)) + newvalue(i) = Double.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; @@ -108,7 +108,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Float](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToFloat(boxed(i)) + newvalue(i) = Float.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; @@ -116,7 +116,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Long](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToLong(boxed(i)) + newvalue(i) = Long.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; @@ -124,7 +124,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Char](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToChar(boxed(i)) + newvalue(i) = Char.unbox(boxed(i)) i = i + 1 } unboxed = newvalue @@ -132,7 +132,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Byte](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToByte(boxed(i)) + newvalue(i) = Byte.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; @@ -140,7 +140,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Short](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToShort(boxed(i)) + newvalue(i) = Short.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; @@ -148,7 +148,7 @@ final class BoxedAnyArray(val length: Int) extends BoxedArray { val newvalue = new Array[Boolean](length) var i = 0 while (i < length) { - newvalue(i) = BoxesUtility.unboxToBoolean(boxed(i)) + newvalue(i) = Boolean.unbox(boxed(i)) i = i + 1 } unboxed = newvalue; diff --git a/src/library/scala/runtime/BoxedBooleanArray.scala b/src/library/scala/runtime/BoxedBooleanArray.scala index e0ff708205..1f0567abad 100644 --- a/src/library/scala/runtime/BoxedBooleanArray.scala +++ b/src/library/scala/runtime/BoxedBooleanArray.scala @@ -19,10 +19,10 @@ final class BoxedBooleanArray(val value: Array[Boolean]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToBoolean(value(index)) + def apply(index: Int): Any = Boolean.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToBoolean(elem.asInstanceOf[AnyRef]) + value(index) = Boolean.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedByteArray.scala b/src/library/scala/runtime/BoxedByteArray.scala index cf3d6bee6a..753dbaea04 100644 --- a/src/library/scala/runtime/BoxedByteArray.scala +++ b/src/library/scala/runtime/BoxedByteArray.scala @@ -19,10 +19,10 @@ final class BoxedByteArray(val value: Array[Byte]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToByte(value(index)) + def apply(index: Int): Any = Byte.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToByte(elem.asInstanceOf[AnyRef]) + value(index) = Byte.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedCharArray.scala b/src/library/scala/runtime/BoxedCharArray.scala index c13a31134a..adb14dda51 100644 --- a/src/library/scala/runtime/BoxedCharArray.scala +++ b/src/library/scala/runtime/BoxedCharArray.scala @@ -19,10 +19,10 @@ final class BoxedCharArray(val value: Array[Char]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToCharacter(value(index)) + def apply(index: Int): Any = Char.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToChar(elem.asInstanceOf[AnyRef]) + value(index) = Char.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedDoubleArray.scala b/src/library/scala/runtime/BoxedDoubleArray.scala index 08c3b6b843..9a4564e439 100644 --- a/src/library/scala/runtime/BoxedDoubleArray.scala +++ b/src/library/scala/runtime/BoxedDoubleArray.scala @@ -19,10 +19,10 @@ final class BoxedDoubleArray(val value: Array[Double]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToDouble(value(index)) + def apply(index: Int): Any = Double.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToDouble(elem.asInstanceOf[AnyRef]) + value(index) = Double.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedFloatArray.scala b/src/library/scala/runtime/BoxedFloatArray.scala index 13424f136b..1b8ccb3797 100644 --- a/src/library/scala/runtime/BoxedFloatArray.scala +++ b/src/library/scala/runtime/BoxedFloatArray.scala @@ -19,10 +19,10 @@ final class BoxedFloatArray(val value: Array[Float]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToFloat(value(index)) + def apply(index: Int): Any = Float.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToFloat(elem.asInstanceOf[AnyRef]) + value(index) = Float.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedIntArray.scala b/src/library/scala/runtime/BoxedIntArray.scala index a64f4fdb60..d2f5fd0371 100644 --- a/src/library/scala/runtime/BoxedIntArray.scala +++ b/src/library/scala/runtime/BoxedIntArray.scala @@ -19,10 +19,10 @@ final class BoxedIntArray(val value: Array[Int]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToInteger(value(index)) + def apply(index: Int): Any = Int.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToInt(elem.asInstanceOf[AnyRef]) + value(index) = Int.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedLongArray.scala b/src/library/scala/runtime/BoxedLongArray.scala index db4b266e1b..6accc84484 100644 --- a/src/library/scala/runtime/BoxedLongArray.scala +++ b/src/library/scala/runtime/BoxedLongArray.scala @@ -19,10 +19,10 @@ final class BoxedLongArray(val value: Array[Long]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToLong(value(index)) + def apply(index: Int): Any = Long.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToLong(elem.asInstanceOf[AnyRef]) + value(index) = Long.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value diff --git a/src/library/scala/runtime/BoxedShortArray.scala b/src/library/scala/runtime/BoxedShortArray.scala index 229ee46727..161b7b921b 100644 --- a/src/library/scala/runtime/BoxedShortArray.scala +++ b/src/library/scala/runtime/BoxedShortArray.scala @@ -19,10 +19,10 @@ final class BoxedShortArray(val value: Array[Short]) extends BoxedArray { def length: Int = value.length - def apply(index: Int): Any = BoxesUtility.boxToShort(value(index)) + def apply(index: Int): Any = Short.box(value(index)) def update(index: Int, elem: Any): Unit = { - value(index) = BoxesUtility.unboxToShort(elem.asInstanceOf[AnyRef]) + value(index) = Short.unbox(elem.asInstanceOf[AnyRef]) } def unbox(elemTag: String): AnyRef = value |