Skip to content
Newer
Older
100755 46 lines (36 sloc) 1.68 KB
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
1 /* __ *\
2 ** ________ ___ / / ___ Scala API **
3 ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
4 ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
5 ** /____/\___/_/ |_/____/_/ | | **
6 ** |/ **
7 \* */
8
4383277 @paulp Addresses the issues swirling around Double.Eps...
paulp authored
9 // DO NOT EDIT, CHANGES WILL BE LOST.
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
10
11 package scala
12
13
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
14 /** Unit is a member of the value classes, those whose instances are
15 * not represented as objects by the underlying host system. There is
16 * only one value of type Unit: `()`.
17 */
3307c37 Backport from trunk of a large batch of revisions:
Antonio Cunei authored
18 final class Unit extends AnyVal {
19 def getClass(): Class[Unit] = sys.error("stub")
20 }
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
21
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
22 object Unit extends AnyValCompanion {
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
23
24 /** Transform a value type into a boxed reference type.
25 *
26 * @param x the Unit to be boxed
27 * @return a scala.runtime.BoxedUnit offering `x` as its underlying value.
28 */
29 def box(x: Unit): scala.runtime.BoxedUnit = scala.runtime.BoxedUnit.UNIT
30
31 /** Transform a boxed type into a value type. Note that this
32 * method is not typesafe: it accepts any Object, but will throw
33 * an exception if the argument is not a scala.runtime.BoxedUnit.
34 *
35 * @param x the scala.runtime.BoxedUnit to be unboxed.
36 * @throws ClassCastException if the argument is not a scala.runtime.BoxedUnit
37 * @return the Unit value ()
38 */
39 def unbox(x: java.lang.Object): Unit = ()
40
41 /** The String representation of the scala.Unit companion object.
42 */
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
43 override def toString = "object scala.Unit"
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
44 }
45
Something went wrong with that request. Please try again.