summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-04-01 02:18:53 +0000
committerPaul Phillips <paulp@improving.org>2011-04-01 02:18:53 +0000
commit305f49ce8f7358636bf81a7aca29d8ab42d98ed4 (patch)
tree8926915191e1aef1057c6b211f120b329d61d005 /src/library
parent0444357cd5eae4efb401bb8a59c3794db2d1b2db (diff)
downloadscala-305f49ce8f7358636bf81a7aca29d8ab42d98ed4.tar.gz
scala-305f49ce8f7358636bf81a7aca29d8ab42d98ed4.tar.bz2
scala-305f49ce8f7358636bf81a7aca29d8ab42d98ed4.zip
Working on the documentation of core classes.
withdraw some of the goodness I banked a while ago with the AnyVal types. Started on what will culminate in the total elimination of SourcelessComments. Cleaned up the docs on ancient classes like Product. More to come. No review.
Diffstat (limited to 'src/library')
-rwxr-xr-xsrc/library/scala/AnyVal.scala17
-rwxr-xr-xsrc/library/scala/Boolean.scala30
-rw-r--r--src/library/scala/Byte.scala40
-rw-r--r--src/library/scala/Char.scala40
-rw-r--r--src/library/scala/Double.scala41
-rw-r--r--src/library/scala/Equals.scala8
-rw-r--r--src/library/scala/Float.scala41
-rw-r--r--src/library/scala/Int.scala40
-rw-r--r--src/library/scala/Long.scala40
-rw-r--r--src/library/scala/Product.scala36
-rw-r--r--src/library/scala/Short.scala40
-rwxr-xr-xsrc/library/scala/Unit.scala8
12 files changed, 298 insertions, 83 deletions
diff --git a/src/library/scala/AnyVal.scala b/src/library/scala/AnyVal.scala
index 4b4b6038d1..850042700f 100755
--- a/src/library/scala/AnyVal.scala
+++ b/src/library/scala/AnyVal.scala
@@ -8,4 +8,21 @@
package scala
+/** `AnyVal` is the root class of all ''value types'', which describe values
+ * not implemented as objects in the underlying host system. The value classes
+ * are specified in SLS 12.2.
+ *
+ * The standard implementation includes nine `AnyVal` subtypes:
+ *
+ * [[scala.Double]], [[scala.Float]], [[scala.Long]], [[scala.Int]], [[scala.Char]],
+ * [[scala.Short]], and [[scala.Byte]] are the ''numeric value types''.
+ *
+ * [[scala.Unit]] and [[scala.Boolean]] are the ''non-numeric value types''.
+ *
+ * Other groupings:
+ *
+ * The ''subrange types'' are [[scala.Byte]], [[scala.Short]], and [[scala.Char]].
+ * The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]].
+ * The ''floating point types'' are [[scala.Float]] and [[scala.Double]].
+ */
sealed trait AnyVal
diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala
index dc2076cb1d..220fc752c3 100755
--- a/src/library/scala/Boolean.scala
+++ b/src/library/scala/Boolean.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Boolean` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Boolean]] => [[scala.runtime.RichBoolean]]
+ * which provides useful non-primitive operations.
+ */
final class Boolean extends AnyVal {
def unary_! : Boolean = sys.error("stub")
@@ -28,7 +32,25 @@ final class Boolean extends AnyVal {
}
object Boolean extends AnyValCompanion {
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Boolean to be boxed
+ * @return a java.lang.Boolean offering `x` as its underlying value.
+ */
+ def box(x: Boolean): java.lang.Boolean = java.lang.Boolean.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Boolean.
+ *
+ * @param x the Boolean to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Boolean
+ * @return the Boolean resulting from calling booleanValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Boolean = x.asInstanceOf[java.lang.Boolean].booleanValue()
+
+ /** The String representation of the scala.Boolean companion object.
+ */
override def toString = "object scala.Boolean"
- def box(x: Boolean): jl.Boolean = jl.Boolean.valueOf(x)
- def unbox(x: jl.Object): Boolean = x.asInstanceOf[jl.Boolean].booleanValue()
+
} \ No newline at end of file
diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala
index 69d435b33b..2d27fe37d2 100644
--- a/src/library/scala/Byte.scala
+++ b/src/library/scala/Byte.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Byte` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Byte]] => [[scala.runtime.RichByte]]
+ * which provides useful non-primitive operations.
+ */
final class Byte extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -145,10 +149,32 @@ final class Byte extends AnyVal {
object Byte extends AnyValCompanion {
- final val MinValue = jl.Byte.MIN_VALUE
- final val MaxValue = jl.Byte.MAX_VALUE
-
- def box(x: Byte): jl.Byte = jl.Byte.valueOf(x)
- def unbox(x: jl.Object): Byte = x.asInstanceOf[jl.Byte].byteValue()
+ /** The smallest value representable as a Byte.
+ */
+ final val MinValue = java.lang.Byte.MIN_VALUE
+
+ /** The largest value representable as a Byte.
+ */
+ final val MaxValue = java.lang.Byte.MAX_VALUE
+
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Byte to be boxed
+ * @return a java.lang.Byte offering `x` as its underlying value.
+ */
+ def box(x: Byte): java.lang.Byte = java.lang.Byte.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Byte.
+ *
+ * @param x the Byte to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Byte
+ * @return the Byte resulting from calling byteValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Byte = x.asInstanceOf[java.lang.Byte].byteValue()
+
+ /** The String representation of the scala.Byte companion object.
+ */
override def toString = "object scala.Byte"
}
diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala
index 88d7617ea5..b1c9d8e6d4 100644
--- a/src/library/scala/Char.scala
+++ b/src/library/scala/Char.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Char` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Char]] => [[scala.runtime.RichChar]]
+ * which provides useful non-primitive operations.
+ */
final class Char extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -145,10 +149,32 @@ final class Char extends AnyVal {
object Char extends AnyValCompanion {
- final val MinValue = jl.Character.MIN_VALUE
- final val MaxValue = jl.Character.MAX_VALUE
-
- def box(x: Char): jl.Character = jl.Character.valueOf(x)
- def unbox(x: jl.Object): Char = x.asInstanceOf[jl.Character].charValue()
+ /** The smallest value representable as a Char.
+ */
+ final val MinValue = java.lang.Character.MIN_VALUE
+
+ /** The largest value representable as a Char.
+ */
+ final val MaxValue = java.lang.Character.MAX_VALUE
+
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Char to be boxed
+ * @return a java.lang.Character offering `x` as its underlying value.
+ */
+ def box(x: Char): java.lang.Character = java.lang.Character.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Character.
+ *
+ * @param x the Char to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Character
+ * @return the Char resulting from calling charValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Char = x.asInstanceOf[java.lang.Character].charValue()
+
+ /** The String representation of the scala.Char companion object.
+ */
override def toString = "object scala.Char"
}
diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala
index fe37860c07..857647b8a5 100644
--- a/src/library/scala/Double.scala
+++ b/src/library/scala/Double.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Double` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Double]] => [[scala.runtime.RichDouble]]
+ * which provides useful non-primitive operations.
+ */
final class Double extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -120,10 +124,10 @@ final class Double extends AnyVal {
object Double extends AnyValCompanion {
/** The smallest positive value greater than 0.0d.*/
- final val MinPositiveValue = jl.Double.MIN_VALUE
- final val NaN = jl.Double.NaN
- final val PositiveInfinity = jl.Double.POSITIVE_INFINITY
- final val NegativeInfinity = jl.Double.NEGATIVE_INFINITY
+ final val MinPositiveValue = java.lang.Double.MIN_VALUE
+ final val NaN = java.lang.Double.NaN
+ final val PositiveInfinity = java.lang.Double.POSITIVE_INFINITY
+ final val NegativeInfinity = java.lang.Double.NEGATIVE_INFINITY
@deprecated("use Double.MinPositiveValue instead")
final val Epsilon = MinPositiveValue
@@ -133,12 +137,29 @@ object Double extends AnyValCompanion {
* is the smallest positive value representable by a Double. In Scala that number
* is called Double.MinPositiveValue.
*/
- final val MinValue = -jl.Double.MAX_VALUE
+ final val MinValue = -java.lang.Double.MAX_VALUE
/** The largest finite positive number representable as a Double. */
- final val MaxValue = jl.Double.MAX_VALUE
+ final val MaxValue = java.lang.Double.MAX_VALUE
- def box(x: Double): jl.Double = jl.Double.valueOf(x)
- def unbox(x: jl.Object): Double = x.asInstanceOf[jl.Double].doubleValue()
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Double to be boxed
+ * @return a java.lang.Double offering `x` as its underlying value.
+ */
+ def box(x: Double): java.lang.Double = java.lang.Double.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Double.
+ *
+ * @param x the Double to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Double
+ * @return the Double resulting from calling doubleValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Double = x.asInstanceOf[java.lang.Double].doubleValue()
+
+ /** The String representation of the scala.Double companion object.
+ */
override def toString = "object scala.Double"
}
diff --git a/src/library/scala/Equals.scala b/src/library/scala/Equals.scala
index d0929a9ac4..8aff7af175 100644
--- a/src/library/scala/Equals.scala
+++ b/src/library/scala/Equals.scala
@@ -6,22 +6,22 @@
** |/ **
\* */
-
-
package scala
/** An interface containing operations for equality.
* The only method not already present in class `AnyRef` is `canEqual`.
*/
trait Equals {
-
/** A method that should be called from every well-designed equals method
* that is open to be overridden in a subclass. See Programming in Scala,
* Chapter 28 for discussion and design.
+ *
+ * @param that the value being probed for possible equality
+ * @return true if this instance can possibly equal `that`, otherwise false
*/
def canEqual(that: Any): Boolean
- /** The equality method defined in `AnyRef`.
+ /** The universal equality method defined in `AnyRef`.
*/
def equals(that: Any): Boolean
}
diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala
index 39e510e477..59acc73a4d 100644
--- a/src/library/scala/Float.scala
+++ b/src/library/scala/Float.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Float` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Float]] => [[scala.runtime.RichFloat]]
+ * which provides useful non-primitive operations.
+ */
final class Float extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -120,10 +124,10 @@ final class Float extends AnyVal {
object Float extends AnyValCompanion {
/** The smallest positive value greater than 0.0f.*/
- final val MinPositiveValue = jl.Float.MIN_VALUE
- final val NaN = jl.Float.NaN
- final val PositiveInfinity = jl.Float.POSITIVE_INFINITY
- final val NegativeInfinity = jl.Float.NEGATIVE_INFINITY
+ final val MinPositiveValue = java.lang.Float.MIN_VALUE
+ final val NaN = java.lang.Float.NaN
+ final val PositiveInfinity = java.lang.Float.POSITIVE_INFINITY
+ final val NegativeInfinity = java.lang.Float.NEGATIVE_INFINITY
@deprecated("use Float.MinPositiveValue instead")
final val Epsilon = MinPositiveValue
@@ -133,12 +137,29 @@ object Float extends AnyValCompanion {
* is the smallest positive value representable by a Float. In Scala that number
* is called Float.MinPositiveValue.
*/
- final val MinValue = -jl.Float.MAX_VALUE
+ final val MinValue = -java.lang.Float.MAX_VALUE
/** The largest finite positive number representable as a Float. */
- final val MaxValue = jl.Float.MAX_VALUE
+ final val MaxValue = java.lang.Float.MAX_VALUE
- def box(x: Float): jl.Float = jl.Float.valueOf(x)
- def unbox(x: jl.Object): Float = x.asInstanceOf[jl.Float].floatValue()
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Float to be boxed
+ * @return a java.lang.Float offering `x` as its underlying value.
+ */
+ def box(x: Float): java.lang.Float = java.lang.Float.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Float.
+ *
+ * @param x the Float to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Float
+ * @return the Float resulting from calling floatValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Float = x.asInstanceOf[java.lang.Float].floatValue()
+
+ /** The String representation of the scala.Float companion object.
+ */
override def toString = "object scala.Float"
}
diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala
index 69fb0a66b7..42cb6be44f 100644
--- a/src/library/scala/Int.scala
+++ b/src/library/scala/Int.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Int` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Int]] => [[scala.runtime.RichInt]]
+ * which provides useful non-primitive operations.
+ */
final class Int extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -145,10 +149,32 @@ final class Int extends AnyVal {
object Int extends AnyValCompanion {
- final val MinValue = jl.Integer.MIN_VALUE
- final val MaxValue = jl.Integer.MAX_VALUE
-
- def box(x: Int): jl.Integer = jl.Integer.valueOf(x)
- def unbox(x: jl.Object): Int = x.asInstanceOf[jl.Integer].intValue()
+ /** The smallest value representable as a Int.
+ */
+ final val MinValue = java.lang.Integer.MIN_VALUE
+
+ /** The largest value representable as a Int.
+ */
+ final val MaxValue = java.lang.Integer.MAX_VALUE
+
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Int to be boxed
+ * @return a java.lang.Integer offering `x` as its underlying value.
+ */
+ def box(x: Int): java.lang.Integer = java.lang.Integer.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Integer.
+ *
+ * @param x the Int to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Integer
+ * @return the Int resulting from calling intValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Int = x.asInstanceOf[java.lang.Integer].intValue()
+
+ /** The String representation of the scala.Int companion object.
+ */
override def toString = "object scala.Int"
}
diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala
index 7fdefebae3..1de69dab7a 100644
--- a/src/library/scala/Long.scala
+++ b/src/library/scala/Long.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Long` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Long]] => [[scala.runtime.RichLong]]
+ * which provides useful non-primitive operations.
+ */
final class Long extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -145,10 +149,32 @@ final class Long extends AnyVal {
object Long extends AnyValCompanion {
- final val MinValue = jl.Long.MIN_VALUE
- final val MaxValue = jl.Long.MAX_VALUE
-
- def box(x: Long): jl.Long = jl.Long.valueOf(x)
- def unbox(x: jl.Object): Long = x.asInstanceOf[jl.Long].longValue()
+ /** The smallest value representable as a Long.
+ */
+ final val MinValue = java.lang.Long.MIN_VALUE
+
+ /** The largest value representable as a Long.
+ */
+ final val MaxValue = java.lang.Long.MAX_VALUE
+
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Long to be boxed
+ * @return a java.lang.Long offering `x` as its underlying value.
+ */
+ def box(x: Long): java.lang.Long = java.lang.Long.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Long.
+ *
+ * @param x the Long to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Long
+ * @return the Long resulting from calling longValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Long = x.asInstanceOf[java.lang.Long].longValue()
+
+ /** The String representation of the scala.Long companion object.
+ */
override def toString = "object scala.Long"
}
diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala
index 786be5ec13..dfa04bbbe7 100644
--- a/src/library/scala/Product.scala
+++ b/src/library/scala/Product.scala
@@ -8,30 +8,33 @@
package scala
-/** Base trait for all products. See [[scala.Product2]].
+/** Base trait for all products, which in the standard library include at least
+ * [[scala.Product1]] through [[scala.Product22]] and therefore also their
+ * subclasses [[scala.Tuple1]] through [[scala.Tuple22]]. In addition, all case
+ * classes implement Product with synthetically generated methods.
*
* @author Burak Emir
* @version 1.0
* @since 2.3
*/
trait Product extends Equals {
-
- /** Returns the nth element of this product, 0-based. In other words, for a
- * product <code>A(x_1,...,x_k)</code>, returns <code>x_(n+1)</code>
- * where <code>0 &lt;= n &lt; k</code>
+ /** The nth element of this product, 0-based. In other words, for a
+ * product `A(x_1, ..., x_k)`, returns x_(n+1) where 0 < n < k.
*
- * @param n the index of the element to return
- * @throws IndexOutOfBoundsException
- * @return The element <code>n</code> elements after the first element
+ * @param n the index of the element to return
+ * @throws IndexOutOfBoundsException
+ * @return the element `n` elements after the first element
*/
def productElement(n: Int): Any
- /** Returns the size of this product.
- * @return For a product <code>A(x_1,...,x_k)</code>, returns `k`
+ /** The size of this product.
+ * @return for a product `A(x_1, ..., x_k)`, returns `k`
*/
def productArity: Int
- /** An iterator that returns all fields of this product */
+ /** An iterator over all the elements of this product.
+ * @return in the default implementation, an Iterator[Any]
+ */
def productIterator: Iterator[Any] = new Iterator[Any] {
private var c: Int = 0
private val cmax = productArity
@@ -42,12 +45,11 @@ trait Product extends Equals {
@deprecated("use productIterator instead")
def productElements: Iterator[Any] = productIterator
- /**
- * Returns a string that is used in the `toString` method of subtraits/classes.
- * Implementations may override this
- * method in order to prepend a string prefix to the result of the
- * toString methods.
- * @return the empty string
+ /** A string used in the `toString` methods of derived classes.
+ * Implementations may override this method to prepend a string prefix
+ * to the result of toString methods.
+ *
+ * @return in the default implementation, the empty string
*/
def productPrefix = ""
}
diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala
index df3e680575..fc9bee32d4 100644
--- a/src/library/scala/Short.scala
+++ b/src/library/scala/Short.scala
@@ -10,8 +10,12 @@
package scala
-import java.{ lang => jl }
-
+/** `Short` is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system.
+ *
+ * There is an implicit conversion from [[scala.Short]] => [[scala.runtime.RichShort]]
+ * which provides useful non-primitive operations.
+ */
final class Short extends AnyVal {
def toByte: Byte = sys.error("stub")
@@ -145,10 +149,32 @@ final class Short extends AnyVal {
object Short extends AnyValCompanion {
- final val MinValue = jl.Short.MIN_VALUE
- final val MaxValue = jl.Short.MAX_VALUE
-
- def box(x: Short): jl.Short = jl.Short.valueOf(x)
- def unbox(x: jl.Object): Short = x.asInstanceOf[jl.Short].shortValue()
+ /** The smallest value representable as a Short.
+ */
+ final val MinValue = java.lang.Short.MIN_VALUE
+
+ /** The largest value representable as a Short.
+ */
+ final val MaxValue = java.lang.Short.MAX_VALUE
+
+ /** Transform a value type into a boxed reference type.
+ *
+ * @param x the Short to be boxed
+ * @return a java.lang.Short offering `x` as its underlying value.
+ */
+ def box(x: Short): java.lang.Short = java.lang.Short.valueOf(x)
+
+ /** Transform a boxed type into a value type. Note that this
+ * method is not typesafe: it accepts any Object, but will throw
+ * an exception if the argument is not a java.lang.Short.
+ *
+ * @param x the Short to be unboxed.
+ * @throws ClassCastException if the argument is not a java.lang.Short
+ * @return the Short resulting from calling shortValue() on `x`
+ */
+ def unbox(x: java.lang.Object): Short = x.asInstanceOf[java.lang.Short].shortValue()
+
+ /** The String representation of the scala.Short companion object.
+ */
override def toString = "object scala.Short"
}
diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala
index 9e2d4dc616..e69f95bf89 100755
--- a/src/library/scala/Unit.scala
+++ b/src/library/scala/Unit.scala
@@ -10,14 +10,16 @@
package scala
-import java.{ lang => jl }
-
import runtime.BoxedUnit
+/** Unit is a member of the value classes, those whose instances are
+ * not represented as objects by the underlying host system. There is
+ * only one value of type Unit: `()`.
+ */
final class Unit extends AnyVal { }
object Unit extends AnyValCompanion {
override def toString = "object scala.Unit"
def box(x: Unit): BoxedUnit = BoxedUnit.UNIT
- def unbox(x: jl.Object): Unit = ()
+ def unbox(x: java.lang.Object): Unit = ()
} \ No newline at end of file