Skip to content
Newer
Older
100644 49 lines (38 sloc) 1.82 KB
4253124 @paulp The AnyVal types become source files instead of...
paulp authored Jan 24, 2011
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 Mar 15, 2011
9 // DO NOT EDIT, CHANGES WILL BE LOST.
4253124 @paulp The AnyVal types become source files instead of...
paulp authored Jan 24, 2011
10
11 package scala
12
55b6094 @paulp Eliminate breaking relative names in source.
paulp authored Sep 14, 2012
13 import scala.language.implicitConversions
241c760 @paulp Generate abstract methods in scala.Byte and friends.
paulp authored Jun 4, 2012
14
4253124 @paulp The AnyVal types become source files instead of...
paulp authored Jan 24, 2011
15
3f58f66 @heathermiller Small changes to the API documentation of the A...
heathermiller authored Sep 18, 2011
16 /** `Unit` is a subtype of [[scala.AnyVal]]. There is only one value of type
17 * `Unit`, `()`, and it is not represented by any object in the underlying
18 * runtime system. A method with return type `Unit` is analogous to a Java
19 * method which is declared `void`.
305f49c @paulp Working on the documentation of core classes.
paulp authored Apr 1, 2011
20 */
241c760 @paulp Generate abstract methods in scala.Byte and friends.
paulp authored Jun 4, 2012
21 final abstract class Unit private extends AnyVal {
22 override def getClass(): Class[Unit] = null
9853b5b @paulp A total rewrite of "runtimeClass", discarding t...
paulp authored Jun 22, 2011
23 }
9b3852f @paulp A less ad hoc infrastructure for generating Any...
paulp authored Apr 1, 2011
24
241c760 @paulp Generate abstract methods in scala.Byte and friends.
paulp authored Jun 4, 2012
25 object Unit extends AnyValCompanion {
9b3852f @paulp A less ad hoc infrastructure for generating Any...
paulp authored Apr 1, 2011
26
27 /** Transform a value type into a boxed reference type.
28 *
29 * @param x the Unit to be boxed
30 * @return a scala.runtime.BoxedUnit offering `x` as its underlying value.
31 */
32 def box(x: Unit): scala.runtime.BoxedUnit = scala.runtime.BoxedUnit.UNIT
33
34 /** Transform a boxed type into a value type. Note that this
35 * method is not typesafe: it accepts any Object, but will throw
36 * an exception if the argument is not a scala.runtime.BoxedUnit.
37 *
38 * @param x the scala.runtime.BoxedUnit to be unboxed.
39 * @throws ClassCastException if the argument is not a scala.runtime.BoxedUnit
40 * @return the Unit value ()
41 */
305f49c @paulp Working on the documentation of core classes.
paulp authored Apr 1, 2011
42 def unbox(x: java.lang.Object): Unit = ()
9b3852f @paulp A less ad hoc infrastructure for generating Any...
paulp authored Apr 1, 2011
43
44 /** The String representation of the scala.Unit companion object.
45 */
46 override def toString = "object scala.Unit"
47 }
48
Something went wrong with that request. Please try again.