Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 181 lines (153 sloc) 6.905 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
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
13 /** `Int` is a member of the value classes, those whose instances are
14 * not represented as objects by the underlying host system.
15 *
16 * There is an implicit conversion from [[scala.Int]] => [[scala.runtime.RichInt]]
17 * which provides useful non-primitive operations.
18 */
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
19 final class Int extends AnyVal {
20 def toByte: Byte = sys.error("stub")
21 def toShort: Short = sys.error("stub")
22 def toChar: Char = sys.error("stub")
23 def toInt: Int = sys.error("stub")
24 def toLong: Long = sys.error("stub")
25 def toFloat: Float = sys.error("stub")
26 def toDouble: Double = sys.error("stub")
27
28 def unary_+ : Int = sys.error("stub")
29 def unary_- : Int = sys.error("stub")
30 def unary_~ : Int = sys.error("stub")
31
32 def +(x: String): String = sys.error("stub")
33
34 def <<(x: Int): Int = sys.error("stub")
35 def <<(x: Long): Int = sys.error("stub")
36 def >>>(x: Int): Int = sys.error("stub")
37 def >>>(x: Long): Int = sys.error("stub")
38 def >>(x: Int): Int = sys.error("stub")
39 def >>(x: Long): Int = sys.error("stub")
40
41 def ==(x: Byte): Boolean = sys.error("stub")
42 def ==(x: Short): Boolean = sys.error("stub")
43 def ==(x: Char): Boolean = sys.error("stub")
44 def ==(x: Int): Boolean = sys.error("stub")
45 def ==(x: Long): Boolean = sys.error("stub")
46 def ==(x: Float): Boolean = sys.error("stub")
47 def ==(x: Double): Boolean = sys.error("stub")
48
49 def !=(x: Byte): Boolean = sys.error("stub")
50 def !=(x: Short): Boolean = sys.error("stub")
51 def !=(x: Char): Boolean = sys.error("stub")
52 def !=(x: Int): Boolean = sys.error("stub")
53 def !=(x: Long): Boolean = sys.error("stub")
54 def !=(x: Float): Boolean = sys.error("stub")
55 def !=(x: Double): Boolean = sys.error("stub")
56
57 def <(x: Byte): Boolean = sys.error("stub")
58 def <(x: Short): Boolean = sys.error("stub")
59 def <(x: Char): Boolean = sys.error("stub")
60 def <(x: Int): Boolean = sys.error("stub")
61 def <(x: Long): Boolean = sys.error("stub")
62 def <(x: Float): Boolean = sys.error("stub")
63 def <(x: Double): Boolean = sys.error("stub")
64
65 def <=(x: Byte): Boolean = sys.error("stub")
66 def <=(x: Short): Boolean = sys.error("stub")
67 def <=(x: Char): Boolean = sys.error("stub")
68 def <=(x: Int): Boolean = sys.error("stub")
69 def <=(x: Long): Boolean = sys.error("stub")
70 def <=(x: Float): Boolean = sys.error("stub")
71 def <=(x: Double): Boolean = sys.error("stub")
72
73 def >(x: Byte): Boolean = sys.error("stub")
74 def >(x: Short): Boolean = sys.error("stub")
75 def >(x: Char): Boolean = sys.error("stub")
76 def >(x: Int): Boolean = sys.error("stub")
77 def >(x: Long): Boolean = sys.error("stub")
78 def >(x: Float): Boolean = sys.error("stub")
79 def >(x: Double): Boolean = sys.error("stub")
80
81 def >=(x: Byte): Boolean = sys.error("stub")
82 def >=(x: Short): Boolean = sys.error("stub")
83 def >=(x: Char): Boolean = sys.error("stub")
84 def >=(x: Int): Boolean = sys.error("stub")
85 def >=(x: Long): Boolean = sys.error("stub")
86 def >=(x: Float): Boolean = sys.error("stub")
87 def >=(x: Double): Boolean = sys.error("stub")
88
89 def |(x: Byte): Int = sys.error("stub")
90 def |(x: Short): Int = sys.error("stub")
91 def |(x: Char): Int = sys.error("stub")
92 def |(x: Int): Int = sys.error("stub")
93 def |(x: Long): Long = sys.error("stub")
94
95 def &(x: Byte): Int = sys.error("stub")
96 def &(x: Short): Int = sys.error("stub")
97 def &(x: Char): Int = sys.error("stub")
98 def &(x: Int): Int = sys.error("stub")
99 def &(x: Long): Long = sys.error("stub")
100
101 def ^(x: Byte): Int = sys.error("stub")
102 def ^(x: Short): Int = sys.error("stub")
103 def ^(x: Char): Int = sys.error("stub")
104 def ^(x: Int): Int = sys.error("stub")
105 def ^(x: Long): Long = sys.error("stub")
106
107 def +(x: Byte): Int = sys.error("stub")
108 def +(x: Short): Int = sys.error("stub")
109 def +(x: Char): Int = sys.error("stub")
110 def +(x: Int): Int = sys.error("stub")
111 def +(x: Long): Long = sys.error("stub")
112 def +(x: Float): Float = sys.error("stub")
113 def +(x: Double): Double = sys.error("stub")
114
115 def -(x: Byte): Int = sys.error("stub")
116 def -(x: Short): Int = sys.error("stub")
117 def -(x: Char): Int = sys.error("stub")
118 def -(x: Int): Int = sys.error("stub")
119 def -(x: Long): Long = sys.error("stub")
120 def -(x: Float): Float = sys.error("stub")
121 def -(x: Double): Double = sys.error("stub")
122
123 def *(x: Byte): Int = sys.error("stub")
124 def *(x: Short): Int = sys.error("stub")
125 def *(x: Char): Int = sys.error("stub")
126 def *(x: Int): Int = sys.error("stub")
127 def *(x: Long): Long = sys.error("stub")
128 def *(x: Float): Float = sys.error("stub")
129 def *(x: Double): Double = sys.error("stub")
130
131 def /(x: Byte): Int = sys.error("stub")
132 def /(x: Short): Int = sys.error("stub")
133 def /(x: Char): Int = sys.error("stub")
134 def /(x: Int): Int = sys.error("stub")
135 def /(x: Long): Long = sys.error("stub")
136 def /(x: Float): Float = sys.error("stub")
137 def /(x: Double): Double = sys.error("stub")
138
139 def %(x: Byte): Int = sys.error("stub")
140 def %(x: Short): Int = sys.error("stub")
141 def %(x: Char): Int = sys.error("stub")
142 def %(x: Int): Int = sys.error("stub")
143 def %(x: Long): Long = sys.error("stub")
144 def %(x: Float): Float = sys.error("stub")
145 def %(x: Double): Double = sys.error("stub")
146
3307c37 Backport from trunk of a large batch of revisions:
Antonio Cunei authored
147 def getClass(): Class[Int] = sys.error("stub")
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
148 }
149
150 object Int extends AnyValCompanion {
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
151 /** The smallest value representable as a Int.
152 */
153 final val MinValue = java.lang.Integer.MIN_VALUE
154
155 /** The largest value representable as a Int.
156 */
157 final val MaxValue = java.lang.Integer.MAX_VALUE
158
159 /** Transform a value type into a boxed reference type.
160 *
161 * @param x the Int to be boxed
162 * @return a java.lang.Integer offering `x` as its underlying value.
163 */
164 def box(x: Int): java.lang.Integer = java.lang.Integer.valueOf(x)
165
166 /** Transform a boxed type into a value type. Note that this
167 * method is not typesafe: it accepts any Object, but will throw
168 * an exception if the argument is not a java.lang.Integer.
169 *
170 * @param x the java.lang.Integer to be unboxed.
171 * @throws ClassCastException if the argument is not a java.lang.Integer
172 * @return the Int resulting from calling intValue() on `x`
173 */
174 def unbox(x: java.lang.Object): Int = x.asInstanceOf[java.lang.Integer].intValue()
175
176 /** The String representation of the scala.Int companion object.
177 */
4253124 @paulp The AnyVal types become source files instead of...
paulp authored
178 override def toString = "object scala.Int"
179 }
825f369 Merged revisions 24573,24583-24584,24592-24604,...
Antonio Cunei authored
180
Something went wrong with that request. Please try again.