From beae7735b845c680331fd68004d52e681fe3b8d1 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Fri, 13 Apr 2012 18:59:35 +0200 Subject: Improved formatting/display of documentation. Made the primary constructors private to prevent them from appearing in ScalaDoc. --- src/compiler/scala/tools/cmd/gen/AnyVals.scala | 48 +++--- src/library/scala/Boolean.scala | 4 +- src/library/scala/Byte.scala | 206 ++++++++++++------------- src/library/scala/Char.scala | 206 ++++++++++++------------- src/library/scala/Double.scala | 162 +++++++++---------- src/library/scala/Float.scala | 162 +++++++++---------- src/library/scala/Int.scala | 206 ++++++++++++------------- src/library/scala/Long.scala | 206 ++++++++++++------------- src/library/scala/Short.scala | 206 ++++++++++++------------- src/library/scala/Unit.scala | 4 +- 10 files changed, 705 insertions(+), 705 deletions(-) diff --git a/src/compiler/scala/tools/cmd/gen/AnyVals.scala b/src/compiler/scala/tools/cmd/gen/AnyVals.scala index 0869350dd3..85f0d65d6b 100644 --- a/src/compiler/scala/tools/cmd/gen/AnyVals.scala +++ b/src/compiler/scala/tools/cmd/gen/AnyVals.scala @@ -19,15 +19,15 @@ trait AnyValReps { def unaryOps = { val ops = List( Op("+", "/**\n" + - " * @return this value, unmodified\n" + + " * Returns this value, unmodified.\n" + " */"), Op("-", "/**\n" + - " * @return the negation of this value\n" + + " * Returns the negation of this value.\n" + " */")) if(isCardinal) Op("~", "/**\n" + - " * @return the bitwise negation of this value\n" + + " * Returns the bitwise negation of this value.\n" + " * @example {{{\n" + " * ~5 == -6\n" + " * // in binary: ~00000101 ==\n" + @@ -41,7 +41,7 @@ trait AnyValReps { if (isCardinal) List( Op("|", "/**\n" + - " * @return the bitwise OR of this value and x\n" + + " * Returns the bitwise OR of this value and `x`.\n" + " * @example {{{\n" + " * (0xf0 | 0xaa) == 0xfa\n" + " * // in binary: 11110000\n" + @@ -51,7 +51,7 @@ trait AnyValReps { " * }}}\n" + " */"), Op("&", "/**\n" + - " * @return the bitwise AND of this value and x\n" + + " * Returns the bitwise AND of this value and `x`.\n" + " * @example {{{\n" + " * (0xf0 & 0xaa) == 0xa0\n" + " * // in binary: 11110000\n" + @@ -61,7 +61,7 @@ trait AnyValReps { " * }}}\n" + " */"), Op("^", "/**\n" + - " * @return the bitwise XOR of this value and x\n" + + " * Returns the bitwise XOR of this value and `x`.\n" + " * @example {{{\n" + " * (0xf0 ^ 0xaa) == 0x5a\n" + " * // in binary: 11110000\n" + @@ -76,13 +76,13 @@ trait AnyValReps { if (isCardinal) List( Op("<<", "/**\n" + - " * @return this value bit-shifted left by the specified number of bits,\n" + + " * Returns this value bit-shifted left by the specified number of bits,\n" + " * filling in the new right bits with zeroes.\n" + " * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}}\n" + " */"), Op(">>>", "/**\n" + - " * @return this value bit-shifted right by the specified number of bits,\n" + + " * Returns this value bit-shifted right by the specified number of bits,\n" + " * filling the new left bits with zeroes.\n" + " * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}}\n" + " * @example {{{\n" + @@ -93,7 +93,7 @@ trait AnyValReps { " */"), Op(">>", "/**\n" + - " * @return this value bit-shifted left by the specified number of bits,\n" + + " * Returns this value bit-shifted left by the specified number of bits,\n" + " * filling in the right bits with the same value as the left-most bit of this.\n" + " * The effect of this is to retain the sign of the value.\n" + " * @example {{{\n" + @@ -105,19 +105,19 @@ trait AnyValReps { else Nil def comparisonOps = List( - Op("==", "/**\n * @return `true` if this value is equal x, `false` otherwise\n */"), - Op("!=", "/**\n * @return `true` if this value is not equal to x, `false` otherwise\n */"), - Op("<", "/**\n * @return `true` if this value is less than x, `false` otherwise\n */"), - Op("<=", "/**\n * @return `true` if this value is less than or equal to x, `false` otherwise\n */"), - Op(">", "/**\n * @return `true` if this value is greater than x, `false` otherwise\n */"), - Op(">=", "/**\n * @return `true` if this value is greater than or equal to x, `false` otherwise\n */")) + Op("==", "/**\n * Returns `true` if this value is equal to x, `false` otherwise.\n */"), + Op("!=", "/**\n * Returns `true` if this value is not equal to x, `false` otherwise.\n */"), + Op("<", "/**\n * Returns `true` if this value is less than x, `false` otherwise.\n */"), + Op("<=", "/**\n * Returns `true` if this value is less than or equal to x, `false` otherwise.\n */"), + Op(">", "/**\n * Returns `true` if this value is greater than x, `false` otherwise.\n */"), + Op(">=", "/**\n * Returns `true` if this value is greater than or equal to x, `false` otherwise.\n */")) def otherOps = List( - Op("+", "/**\n * @return the sum of this value and x\n */"), - Op("-", "/**\n * @return the difference of this value and x\n */"), - Op("*", "/**\n * @return the product of this value and x\n */"), - Op("/", "/**\n * @return the quotient of this value and x\n */"), - Op("%", "/**\n * @return the remainder of the division of this value by x\n */")) + Op("+", "/**\n * Returns the sum of this value and `x`.\n */"), + Op("-", "/**\n * Returns the difference of this value and `x`.\n */"), + Op("*", "/**\n * Returns the product of this value and `x`.\n */"), + Op("/", "/**\n * Returns the quotient of this value and `x`.\n */"), + Op("%", "/**\n * Returns the remainder of the division of this value by `x`.\n */")) // Given two numeric value types S and T , the operation type of S and T is defined as follows: // If both S and T are subrange types then the operation type of S and T is Int. @@ -224,8 +224,8 @@ trait AnyValReps { def classDoc = interpolate(classDocTemplate) def objectDoc = "" def mkImports = "" - def mkClass = assemble("final class", "AnyVal", classLines) + "\n" - def mkObject = assemble("object", "AnyValCompanion", objectLines) + "\n" + def mkClass = assemble("final class", "private", "AnyVal", classLines) + "\n" + def mkObject = assemble("object", "", "AnyValCompanion", objectLines) + "\n" def make() = List[String]( headerTemplate, mkImports, @@ -235,8 +235,8 @@ trait AnyValReps { mkObject ) mkString "" - def assemble(what: String, parent: String, lines: List[String]): String = { - val decl = "%s %s extends %s ".format(what, name, parent) + def assemble(what: String, ctor: String, parent: String, lines: List[String]): String = { + val decl = "%s %s %s extends %s ".format(what, name, ctor, parent) val body = if (lines.isEmpty) "{ }\n\n" else lines map indent mkString ("{\n", "\n", "\n}\n") decl + body diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala index 5078e59d28..edb82b33fe 100644 --- a/src/library/scala/Boolean.scala +++ b/src/library/scala/Boolean.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Boolean]] => [[scala.runtime.RichBoolean]] * which provides useful non-primitive operations. */ -final class Boolean extends AnyVal { +final class Boolean private extends AnyVal { /** * Negates a Boolean expression. * @@ -110,7 +110,7 @@ final class Boolean extends AnyVal { override def getClass(): Class[Boolean] = sys.error("stub") } -object Boolean extends AnyValCompanion { +object Boolean extends AnyValCompanion { /** Transform a value type into a boxed reference type. * diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala index f9c5f6003e..38861752c6 100644 --- a/src/library/scala/Byte.scala +++ b/src/library/scala/Byte.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Byte]] => [[scala.runtime.RichByte]] * which provides useful non-primitive operations. */ -final class Byte extends AnyVal { +final class Byte private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,7 +27,7 @@ final class Byte extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return the bitwise negation of this value + * Returns the bitwise negation of this value. * @example {{{ * ~5 == -6 * // in binary: ~00000101 == @@ -36,30 +36,30 @@ final class Byte extends AnyVal { */ def unary_~ : Int = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Int = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Int = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -70,7 +70,7 @@ final class Byte extends AnyVal { */ def >>>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -81,7 +81,7 @@ final class Byte extends AnyVal { */ def >>>(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -92,7 +92,7 @@ final class Byte extends AnyVal { */ def >>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -104,181 +104,181 @@ final class Byte extends AnyVal { def >>(x: Long): Int = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -289,7 +289,7 @@ final class Byte extends AnyVal { */ def |(x: Byte): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -300,7 +300,7 @@ final class Byte extends AnyVal { */ def |(x: Short): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -311,7 +311,7 @@ final class Byte extends AnyVal { */ def |(x: Char): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -322,7 +322,7 @@ final class Byte extends AnyVal { */ def |(x: Int): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -334,7 +334,7 @@ final class Byte extends AnyVal { def |(x: Long): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -345,7 +345,7 @@ final class Byte extends AnyVal { */ def &(x: Byte): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -356,7 +356,7 @@ final class Byte extends AnyVal { */ def &(x: Short): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -367,7 +367,7 @@ final class Byte extends AnyVal { */ def &(x: Char): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -378,7 +378,7 @@ final class Byte extends AnyVal { */ def &(x: Int): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -390,7 +390,7 @@ final class Byte extends AnyVal { def &(x: Long): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -401,7 +401,7 @@ final class Byte extends AnyVal { */ def ^(x: Byte): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -412,7 +412,7 @@ final class Byte extends AnyVal { */ def ^(x: Short): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -423,7 +423,7 @@ final class Byte extends AnyVal { */ def ^(x: Char): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -434,7 +434,7 @@ final class Byte extends AnyVal { */ def ^(x: Int): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -446,154 +446,154 @@ final class Byte extends AnyVal { def ^(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Byte] = sys.error("stub") } -object Byte extends AnyValCompanion { +object Byte extends AnyValCompanion { /** The smallest value representable as a Byte. */ final val MinValue = java.lang.Byte.MIN_VALUE diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala index 3d459782cd..4504abfd73 100644 --- a/src/library/scala/Char.scala +++ b/src/library/scala/Char.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Char]] => [[scala.runtime.RichChar]] * which provides useful non-primitive operations. */ -final class Char extends AnyVal { +final class Char private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,7 +27,7 @@ final class Char extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return the bitwise negation of this value + * Returns the bitwise negation of this value. * @example {{{ * ~5 == -6 * // in binary: ~00000101 == @@ -36,30 +36,30 @@ final class Char extends AnyVal { */ def unary_~ : Int = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Int = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Int = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -70,7 +70,7 @@ final class Char extends AnyVal { */ def >>>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -81,7 +81,7 @@ final class Char extends AnyVal { */ def >>>(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -92,7 +92,7 @@ final class Char extends AnyVal { */ def >>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -104,181 +104,181 @@ final class Char extends AnyVal { def >>(x: Long): Int = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -289,7 +289,7 @@ final class Char extends AnyVal { */ def |(x: Byte): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -300,7 +300,7 @@ final class Char extends AnyVal { */ def |(x: Short): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -311,7 +311,7 @@ final class Char extends AnyVal { */ def |(x: Char): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -322,7 +322,7 @@ final class Char extends AnyVal { */ def |(x: Int): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -334,7 +334,7 @@ final class Char extends AnyVal { def |(x: Long): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -345,7 +345,7 @@ final class Char extends AnyVal { */ def &(x: Byte): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -356,7 +356,7 @@ final class Char extends AnyVal { */ def &(x: Short): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -367,7 +367,7 @@ final class Char extends AnyVal { */ def &(x: Char): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -378,7 +378,7 @@ final class Char extends AnyVal { */ def &(x: Int): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -390,7 +390,7 @@ final class Char extends AnyVal { def &(x: Long): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -401,7 +401,7 @@ final class Char extends AnyVal { */ def ^(x: Byte): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -412,7 +412,7 @@ final class Char extends AnyVal { */ def ^(x: Short): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -423,7 +423,7 @@ final class Char extends AnyVal { */ def ^(x: Char): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -434,7 +434,7 @@ final class Char extends AnyVal { */ def ^(x: Int): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -446,154 +446,154 @@ final class Char extends AnyVal { def ^(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Char] = sys.error("stub") } -object Char extends AnyValCompanion { +object Char extends AnyValCompanion { /** The smallest value representable as a Char. */ final val MinValue = java.lang.Character.MIN_VALUE diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index 01414265c4..bb659b963a 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Double]] => [[scala.runtime.RichDouble]] * which provides useful non-primitive operations. */ -final class Double extends AnyVal { +final class Double private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,339 +27,339 @@ final class Double extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Double = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Double = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Double = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Double] = sys.error("stub") } -object Double extends AnyValCompanion { +object Double extends AnyValCompanion { /** The smallest positive value greater than 0.0d which is * representable as a Double. */ diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala index ff5b3cb112..3352c89aa1 100644 --- a/src/library/scala/Float.scala +++ b/src/library/scala/Float.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Float]] => [[scala.runtime.RichFloat]] * which provides useful non-primitive operations. */ -final class Float extends AnyVal { +final class Float private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,339 +27,339 @@ final class Float extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Float = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Float = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Float] = sys.error("stub") } -object Float extends AnyValCompanion { +object Float extends AnyValCompanion { /** The smallest positive value greater than 0.0f which is * representable as a Float. */ diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala index 316bbced2d..6cf3e97c63 100644 --- a/src/library/scala/Int.scala +++ b/src/library/scala/Int.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Int]] => [[scala.runtime.RichInt]] * which provides useful non-primitive operations. */ -final class Int extends AnyVal { +final class Int private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,7 +27,7 @@ final class Int extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return the bitwise negation of this value + * Returns the bitwise negation of this value. * @example {{{ * ~5 == -6 * // in binary: ~00000101 == @@ -36,30 +36,30 @@ final class Int extends AnyVal { */ def unary_~ : Int = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Int = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Int = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -70,7 +70,7 @@ final class Int extends AnyVal { */ def >>>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -81,7 +81,7 @@ final class Int extends AnyVal { */ def >>>(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -92,7 +92,7 @@ final class Int extends AnyVal { */ def >>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -104,181 +104,181 @@ final class Int extends AnyVal { def >>(x: Long): Int = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -289,7 +289,7 @@ final class Int extends AnyVal { */ def |(x: Byte): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -300,7 +300,7 @@ final class Int extends AnyVal { */ def |(x: Short): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -311,7 +311,7 @@ final class Int extends AnyVal { */ def |(x: Char): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -322,7 +322,7 @@ final class Int extends AnyVal { */ def |(x: Int): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -334,7 +334,7 @@ final class Int extends AnyVal { def |(x: Long): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -345,7 +345,7 @@ final class Int extends AnyVal { */ def &(x: Byte): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -356,7 +356,7 @@ final class Int extends AnyVal { */ def &(x: Short): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -367,7 +367,7 @@ final class Int extends AnyVal { */ def &(x: Char): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -378,7 +378,7 @@ final class Int extends AnyVal { */ def &(x: Int): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -390,7 +390,7 @@ final class Int extends AnyVal { def &(x: Long): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -401,7 +401,7 @@ final class Int extends AnyVal { */ def ^(x: Byte): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -412,7 +412,7 @@ final class Int extends AnyVal { */ def ^(x: Short): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -423,7 +423,7 @@ final class Int extends AnyVal { */ def ^(x: Char): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -434,7 +434,7 @@ final class Int extends AnyVal { */ def ^(x: Int): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -446,154 +446,154 @@ final class Int extends AnyVal { def ^(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Int] = sys.error("stub") } -object Int extends AnyValCompanion { +object Int extends AnyValCompanion { /** The smallest value representable as a Int. */ final val MinValue = java.lang.Integer.MIN_VALUE diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala index ce8618c22a..d316b28035 100644 --- a/src/library/scala/Long.scala +++ b/src/library/scala/Long.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Long]] => [[scala.runtime.RichLong]] * which provides useful non-primitive operations. */ -final class Long extends AnyVal { +final class Long private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,7 +27,7 @@ final class Long extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return the bitwise negation of this value + * Returns the bitwise negation of this value. * @example {{{ * ~5 == -6 * // in binary: ~00000101 == @@ -36,30 +36,30 @@ final class Long extends AnyVal { */ def unary_~ : Long = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Long = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Long = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Int): Long = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Long): Long = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -70,7 +70,7 @@ final class Long extends AnyVal { */ def >>>(x: Int): Long = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -81,7 +81,7 @@ final class Long extends AnyVal { */ def >>>(x: Long): Long = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -92,7 +92,7 @@ final class Long extends AnyVal { */ def >>(x: Int): Long = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -104,181 +104,181 @@ final class Long extends AnyVal { def >>(x: Long): Long = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -289,7 +289,7 @@ final class Long extends AnyVal { */ def |(x: Byte): Long = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -300,7 +300,7 @@ final class Long extends AnyVal { */ def |(x: Short): Long = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -311,7 +311,7 @@ final class Long extends AnyVal { */ def |(x: Char): Long = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -322,7 +322,7 @@ final class Long extends AnyVal { */ def |(x: Int): Long = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -334,7 +334,7 @@ final class Long extends AnyVal { def |(x: Long): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -345,7 +345,7 @@ final class Long extends AnyVal { */ def &(x: Byte): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -356,7 +356,7 @@ final class Long extends AnyVal { */ def &(x: Short): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -367,7 +367,7 @@ final class Long extends AnyVal { */ def &(x: Char): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -378,7 +378,7 @@ final class Long extends AnyVal { */ def &(x: Int): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -390,7 +390,7 @@ final class Long extends AnyVal { def &(x: Long): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -401,7 +401,7 @@ final class Long extends AnyVal { */ def ^(x: Byte): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -412,7 +412,7 @@ final class Long extends AnyVal { */ def ^(x: Short): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -423,7 +423,7 @@ final class Long extends AnyVal { */ def ^(x: Char): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -434,7 +434,7 @@ final class Long extends AnyVal { */ def ^(x: Int): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -446,154 +446,154 @@ final class Long extends AnyVal { def ^(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Long] = sys.error("stub") } -object Long extends AnyValCompanion { +object Long extends AnyValCompanion { /** The smallest value representable as a Long. */ final val MinValue = java.lang.Long.MIN_VALUE diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala index 5664c3b44c..b92a02152a 100644 --- a/src/library/scala/Short.scala +++ b/src/library/scala/Short.scala @@ -17,7 +17,7 @@ package scala * There is an implicit conversion from [[scala.Short]] => [[scala.runtime.RichShort]] * which provides useful non-primitive operations. */ -final class Short extends AnyVal { +final class Short private extends AnyVal { def toByte: Byte = sys.error("stub") def toShort: Short = sys.error("stub") def toChar: Char = sys.error("stub") @@ -27,7 +27,7 @@ final class Short extends AnyVal { def toDouble: Double = sys.error("stub") /** - * @return the bitwise negation of this value + * Returns the bitwise negation of this value. * @example {{{ * ~5 == -6 * // in binary: ~00000101 == @@ -36,30 +36,30 @@ final class Short extends AnyVal { */ def unary_~ : Int = sys.error("stub") /** - * @return this value, unmodified + * Returns this value, unmodified. */ def unary_+ : Int = sys.error("stub") /** - * @return the negation of this value + * Returns the negation of this value. */ def unary_- : Int = sys.error("stub") def +(x: String): String = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the new right bits with zeroes. * @example {{{ 6 << 3 == 48 // in binary: 0110 << 3 == 0110000 }}} */ def <<(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -70,7 +70,7 @@ final class Short extends AnyVal { */ def >>>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted right by the specified number of bits, + * Returns this value bit-shifted right by the specified number of bits, * filling the new left bits with zeroes. * @example {{{ 21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010 }}} * @example {{{ @@ -81,7 +81,7 @@ final class Short extends AnyVal { */ def >>>(x: Long): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -92,7 +92,7 @@ final class Short extends AnyVal { */ def >>(x: Int): Int = sys.error("stub") /** - * @return this value bit-shifted left by the specified number of bits, + * Returns this value bit-shifted left by the specified number of bits, * filling in the right bits with the same value as the left-most bit of this. * The effect of this is to retain the sign of the value. * @example {{{ @@ -104,181 +104,181 @@ final class Short extends AnyVal { def >>(x: Long): Int = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is equal x, `false` otherwise + * Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is not equal to x, `false` otherwise + * Returns `true` if this value is not equal to x, `false` otherwise. */ def !=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than x, `false` otherwise + * Returns `true` if this value is less than x, `false` otherwise. */ def <(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is less than or equal to x, `false` otherwise + * Returns `true` if this value is less than or equal to x, `false` otherwise. */ def <=(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than x, `false` otherwise + * Returns `true` if this value is greater than x, `false` otherwise. */ def >(x: Double): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Byte): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Short): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Char): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Int): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Long): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Float): Boolean = sys.error("stub") /** - * @return `true` if this value is greater than or equal to x, `false` otherwise + * Returns `true` if this value is greater than or equal to x, `false` otherwise. */ def >=(x: Double): Boolean = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -289,7 +289,7 @@ final class Short extends AnyVal { */ def |(x: Byte): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -300,7 +300,7 @@ final class Short extends AnyVal { */ def |(x: Short): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -311,7 +311,7 @@ final class Short extends AnyVal { */ def |(x: Char): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -322,7 +322,7 @@ final class Short extends AnyVal { */ def |(x: Int): Int = sys.error("stub") /** - * @return the bitwise OR of this value and x + * Returns the bitwise OR of this value and `x`. * @example {{{ * (0xf0 | 0xaa) == 0xfa * // in binary: 11110000 @@ -334,7 +334,7 @@ final class Short extends AnyVal { def |(x: Long): Long = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -345,7 +345,7 @@ final class Short extends AnyVal { */ def &(x: Byte): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -356,7 +356,7 @@ final class Short extends AnyVal { */ def &(x: Short): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -367,7 +367,7 @@ final class Short extends AnyVal { */ def &(x: Char): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -378,7 +378,7 @@ final class Short extends AnyVal { */ def &(x: Int): Int = sys.error("stub") /** - * @return the bitwise AND of this value and x + * Returns the bitwise AND of this value and `x`. * @example {{{ * (0xf0 & 0xaa) == 0xa0 * // in binary: 11110000 @@ -390,7 +390,7 @@ final class Short extends AnyVal { def &(x: Long): Long = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -401,7 +401,7 @@ final class Short extends AnyVal { */ def ^(x: Byte): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -412,7 +412,7 @@ final class Short extends AnyVal { */ def ^(x: Short): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -423,7 +423,7 @@ final class Short extends AnyVal { */ def ^(x: Char): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -434,7 +434,7 @@ final class Short extends AnyVal { */ def ^(x: Int): Int = sys.error("stub") /** - * @return the bitwise XOR of this value and x + * Returns the bitwise XOR of this value and `x`. * @example {{{ * (0xf0 ^ 0xaa) == 0x5a * // in binary: 11110000 @@ -446,154 +446,154 @@ final class Short extends AnyVal { def ^(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Byte): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Short): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Char): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Int): Int = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Long): Long = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Float): Float = sys.error("stub") /** - * @return the sum of this value and x + * Returns the sum of this value and `x`. */ def +(x: Double): Double = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Byte): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Short): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Char): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Int): Int = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Long): Long = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Float): Float = sys.error("stub") /** - * @return the difference of this value and x + * Returns the difference of this value and `x`. */ def -(x: Double): Double = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Byte): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Short): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Char): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Int): Int = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Long): Long = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Float): Float = sys.error("stub") /** - * @return the product of this value and x + * Returns the product of this value and `x`. */ def *(x: Double): Double = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Byte): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Short): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Char): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Int): Int = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Long): Long = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Float): Float = sys.error("stub") /** - * @return the quotient of this value and x + * Returns the quotient of this value and `x`. */ def /(x: Double): Double = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Byte): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Short): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Char): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Int): Int = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Long): Long = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Float): Float = sys.error("stub") /** - * @return the remainder of the division of this value by x + * Returns the remainder of the division of this value by `x`. */ def %(x: Double): Double = sys.error("stub") override def getClass(): Class[Short] = sys.error("stub") } -object Short extends AnyValCompanion { +object Short extends AnyValCompanion { /** The smallest value representable as a Short. */ final val MinValue = java.lang.Short.MIN_VALUE diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala index f6ed0121ab..3da5c083d4 100644 --- a/src/library/scala/Unit.scala +++ b/src/library/scala/Unit.scala @@ -16,11 +16,11 @@ package scala * runtime system. A method with return type `Unit` is analogous to a Java * method which is declared `void`. */ -final class Unit extends AnyVal { +final class Unit private extends AnyVal { override def getClass(): Class[Unit] = sys.error("stub") } -object Unit extends AnyValCompanion { +object Unit extends AnyValCompanion { /** Transform a value type into a boxed reference type. * -- cgit v1.2.3