13
/** `Char` is a member of the value classes, those whose instances are
14
* not represented as objects by the underlying host system.
13
import scala.language.implicitConversions
15
/** `Char`, a 16-bit unsigned integer (equivalent to Java's `char` primitive type) is a
16
* subtype of [[scala.AnyVal]]. Instances of `Char` are not
17
* represented by an object in the underlying runtime system.
16
19
* There is an implicit conversion from [[scala.Char]] => [[scala.runtime.RichChar]]
17
20
* which provides useful non-primitive operations.
19
final class Char 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")
28
def unary_+ : Int = sys.error("stub")
29
def unary_- : Int = sys.error("stub")
30
def unary_~ : Int = sys.error("stub")
32
def +(x: String): String = sys.error("stub")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
147
def getClass(): Class[Char] = sys.error("stub")
22
final abstract class Char private extends AnyVal {
32
* Returns the bitwise negation of this value.
35
* // in binary: ~00000101 ==
41
* Returns this value, unmodified.
45
* Returns the negation of this value.
49
def +(x: String): String
52
* Returns this value bit-shifted left by the specified number of bits,
53
* filling in the new right bits with zeroes.
54
* @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}}
58
* Returns this value bit-shifted left by the specified number of bits,
59
* filling in the new right bits with zeroes.
60
* @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}}
64
* Returns this value bit-shifted right by the specified number of bits,
65
* filling the new left bits with zeroes.
66
* @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}}
68
* -21 >>> 3 == 536870909
69
* // in binary: 11111111 11111111 11111111 11101011 >>> 3 ==
70
* // 00011111 11111111 11111111 11111101
75
* Returns this value bit-shifted right by the specified number of bits,
76
* filling the new left bits with zeroes.
77
* @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}}
79
* -21 >>> 3 == 536870909
80
* // in binary: 11111111 11111111 11111111 11101011 >>> 3 ==
81
* // 00011111 11111111 11111111 11111101
86
* Returns this value bit-shifted left by the specified number of bits,
87
* filling in the right bits with the same value as the left-most bit of this.
88
* The effect of this is to retain the sign of the value.
91
* // in binary: 11111111 11111111 11111111 11101011 >> 3 ==
92
* // 11111111 11111111 11111111 11111101
97
* Returns this value bit-shifted left by the specified number of bits,
98
* filling in the right bits with the same value as the left-most bit of this.
99
* The effect of this is to retain the sign of the value.
102
* // in binary: 11111111 11111111 11111111 11101011 >> 3 ==
103
* // 11111111 11111111 11111111 11111101
109
* Returns `true` if this value is equal to x, `false` otherwise.
111
def ==(x: Byte): Boolean
113
* Returns `true` if this value is equal to x, `false` otherwise.
115
def ==(x: Short): Boolean
117
* Returns `true` if this value is equal to x, `false` otherwise.
119
def ==(x: Char): Boolean
121
* Returns `true` if this value is equal to x, `false` otherwise.
123
def ==(x: Int): Boolean
125
* Returns `true` if this value is equal to x, `false` otherwise.
127
def ==(x: Long): Boolean
129
* Returns `true` if this value is equal to x, `false` otherwise.
131
def ==(x: Float): Boolean
133
* Returns `true` if this value is equal to x, `false` otherwise.
135
def ==(x: Double): Boolean
138
* Returns `true` if this value is not equal to x, `false` otherwise.
140
def !=(x: Byte): Boolean
142
* Returns `true` if this value is not equal to x, `false` otherwise.
144
def !=(x: Short): Boolean
146
* Returns `true` if this value is not equal to x, `false` otherwise.
148
def !=(x: Char): Boolean
150
* Returns `true` if this value is not equal to x, `false` otherwise.
152
def !=(x: Int): Boolean
154
* Returns `true` if this value is not equal to x, `false` otherwise.
156
def !=(x: Long): Boolean
158
* Returns `true` if this value is not equal to x, `false` otherwise.
160
def !=(x: Float): Boolean
162
* Returns `true` if this value is not equal to x, `false` otherwise.
164
def !=(x: Double): Boolean
167
* Returns `true` if this value is less than x, `false` otherwise.
169
def <(x: Byte): Boolean
171
* Returns `true` if this value is less than x, `false` otherwise.
173
def <(x: Short): Boolean
175
* Returns `true` if this value is less than x, `false` otherwise.
177
def <(x: Char): Boolean
179
* Returns `true` if this value is less than x, `false` otherwise.
181
def <(x: Int): Boolean
183
* Returns `true` if this value is less than x, `false` otherwise.
185
def <(x: Long): Boolean
187
* Returns `true` if this value is less than x, `false` otherwise.
189
def <(x: Float): Boolean
191
* Returns `true` if this value is less than x, `false` otherwise.
193
def <(x: Double): Boolean
196
* Returns `true` if this value is less than or equal to x, `false` otherwise.
198
def <=(x: Byte): Boolean
200
* Returns `true` if this value is less than or equal to x, `false` otherwise.
202
def <=(x: Short): Boolean
204
* Returns `true` if this value is less than or equal to x, `false` otherwise.
206
def <=(x: Char): Boolean
208
* Returns `true` if this value is less than or equal to x, `false` otherwise.
210
def <=(x: Int): Boolean
212
* Returns `true` if this value is less than or equal to x, `false` otherwise.
214
def <=(x: Long): Boolean
216
* Returns `true` if this value is less than or equal to x, `false` otherwise.
218
def <=(x: Float): Boolean
220
* Returns `true` if this value is less than or equal to x, `false` otherwise.
222
def <=(x: Double): Boolean
225
* Returns `true` if this value is greater than x, `false` otherwise.
227
def >(x: Byte): Boolean
229
* Returns `true` if this value is greater than x, `false` otherwise.
231
def >(x: Short): Boolean
233
* Returns `true` if this value is greater than x, `false` otherwise.
235
def >(x: Char): Boolean
237
* Returns `true` if this value is greater than x, `false` otherwise.
239
def >(x: Int): Boolean
241
* Returns `true` if this value is greater than x, `false` otherwise.
243
def >(x: Long): Boolean
245
* Returns `true` if this value is greater than x, `false` otherwise.
247
def >(x: Float): Boolean
249
* Returns `true` if this value is greater than x, `false` otherwise.
251
def >(x: Double): Boolean
254
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
256
def >=(x: Byte): Boolean
258
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
260
def >=(x: Short): Boolean
262
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
264
def >=(x: Char): Boolean
266
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
268
def >=(x: Int): Boolean
270
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
272
def >=(x: Long): Boolean
274
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
276
def >=(x: Float): Boolean
278
* Returns `true` if this value is greater than or equal to x, `false` otherwise.
280
def >=(x: Double): Boolean
283
* Returns the bitwise OR of this value and `x`.
285
* (0xf0 | 0xaa) == 0xfa
286
* // in binary: 11110000
294
* Returns the bitwise OR of this value and `x`.
296
* (0xf0 | 0xaa) == 0xfa
297
* // in binary: 11110000
305
* Returns the bitwise OR of this value and `x`.
307
* (0xf0 | 0xaa) == 0xfa
308
* // in binary: 11110000
316
* Returns the bitwise OR of this value and `x`.
318
* (0xf0 | 0xaa) == 0xfa
319
* // in binary: 11110000
327
* Returns the bitwise OR of this value and `x`.
329
* (0xf0 | 0xaa) == 0xfa
330
* // in binary: 11110000
339
* Returns the bitwise AND of this value and `x`.
341
* (0xf0 & 0xaa) == 0xa0
342
* // in binary: 11110000
350
* Returns the bitwise AND of this value and `x`.
352
* (0xf0 & 0xaa) == 0xa0
353
* // in binary: 11110000
361
* Returns the bitwise AND of this value and `x`.
363
* (0xf0 & 0xaa) == 0xa0
364
* // in binary: 11110000
372
* Returns the bitwise AND of this value and `x`.
374
* (0xf0 & 0xaa) == 0xa0
375
* // in binary: 11110000
383
* Returns the bitwise AND of this value and `x`.
385
* (0xf0 & 0xaa) == 0xa0
386
* // in binary: 11110000
395
* Returns the bitwise XOR of this value and `x`.
397
* (0xf0 ^ 0xaa) == 0x5a
398
* // in binary: 11110000
406
* Returns the bitwise XOR of this value and `x`.
408
* (0xf0 ^ 0xaa) == 0x5a
409
* // in binary: 11110000
417
* Returns the bitwise XOR of this value and `x`.
419
* (0xf0 ^ 0xaa) == 0x5a
420
* // in binary: 11110000
428
* Returns the bitwise XOR of this value and `x`.
430
* (0xf0 ^ 0xaa) == 0x5a
431
* // in binary: 11110000
439
* Returns the bitwise XOR of this value and `x`.
441
* (0xf0 ^ 0xaa) == 0x5a
442
* // in binary: 11110000
451
* Returns the sum of this value and `x`.
455
* Returns the sum of this value and `x`.
459
* Returns the sum of this value and `x`.
463
* Returns the sum of this value and `x`.
467
* Returns the sum of this value and `x`.
471
* Returns the sum of this value and `x`.
473
def +(x: Float): Float
475
* Returns the sum of this value and `x`.
477
def +(x: Double): Double
480
* Returns the difference of this value and `x`.
484
* Returns the difference of this value and `x`.
488
* Returns the difference of this value and `x`.
492
* Returns the difference of this value and `x`.
496
* Returns the difference of this value and `x`.
500
* Returns the difference of this value and `x`.
502
def -(x: Float): Float
504
* Returns the difference of this value and `x`.
506
def -(x: Double): Double
509
* Returns the product of this value and `x`.
513
* Returns the product of this value and `x`.
517
* Returns the product of this value and `x`.
521
* Returns the product of this value and `x`.
525
* Returns the product of this value and `x`.
529
* Returns the product of this value and `x`.
531
def *(x: Float): Float
533
* Returns the product of this value and `x`.
535
def *(x: Double): Double
538
* Returns the quotient of this value and `x`.
542
* Returns the quotient of this value and `x`.
546
* Returns the quotient of this value and `x`.
550
* Returns the quotient of this value and `x`.
554
* Returns the quotient of this value and `x`.
558
* Returns the quotient of this value and `x`.
560
def /(x: Float): Float
562
* Returns the quotient of this value and `x`.
564
def /(x: Double): Double
567
* Returns the remainder of the division of this value by `x`.
571
* Returns the remainder of the division of this value by `x`.
575
* Returns the remainder of the division of this value by `x`.
579
* Returns the remainder of the division of this value by `x`.
583
* Returns the remainder of the division of this value by `x`.
587
* Returns the remainder of the division of this value by `x`.
589
def %(x: Float): Float
591
* Returns the remainder of the division of this value by `x`.
593
def %(x: Double): Double
595
override def getClass(): Class[Char] = null
150
598
object Char extends AnyValCompanion {