diff options
Diffstat (limited to 'src/library/scala/Byte.scala')
-rw-r--r-- | src/library/scala/Byte.scala | 336 |
1 files changed, 87 insertions, 249 deletions
diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala index 2510e859c0..413231c0d1 100644 --- a/src/library/scala/Byte.scala +++ b/src/library/scala/Byte.scala @@ -6,12 +6,12 @@ ** |/ ** \* */ -// DO NOT EDIT, CHANGES WILL BE LOST. +// DO NOT EDIT, CHANGES WILL BE LOST +// This auto-generated code can be modified in scala.tools.cmd.gen. +// Afterwards, running tools/codegen-anyvals regenerates this source file. package scala -import scala.language.implicitConversions - /** `Byte`, a 8-bit signed integer (equivalent to Java's `byte` primitive type) is a * subtype of [[scala.AnyVal]]. Instances of `Byte` are not * represented by an object in the underlying runtime system. @@ -37,13 +37,9 @@ final abstract class Byte private extends AnyVal { * }}} */ def unary_~ : Int - /** - * Returns this value, unmodified. - */ + /** Returns this value, unmodified. */ def unary_+ : Int - /** - * Returns the negation of this value. - */ + /** Returns the negation of this value. */ def unary_- : Int def +(x: String): String @@ -105,178 +101,94 @@ final abstract class Byte private extends AnyVal { */ def >>(x: Long): Int - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Byte): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Short): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Char): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Int): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Long): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Float): Boolean - /** - * Returns `true` if this value is equal to x, `false` otherwise. - */ + /** Returns `true` if this value is equal to x, `false` otherwise. */ def ==(x: Double): Boolean - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 - /** - * Returns `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 /** @@ -447,161 +359,89 @@ final abstract class Byte private extends AnyVal { */ def ^(x: Long): Long - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Byte): Int - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Short): Int - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Char): Int - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Int): Int - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Long): Long - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Float): Float - /** - * Returns the sum of this value and `x`. - */ + /** Returns the sum of this value and `x`. */ def +(x: Double): Double - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Byte): Int - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Short): Int - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Char): Int - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Int): Int - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Long): Long - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Float): Float - /** - * Returns the difference of this value and `x`. - */ + /** Returns the difference of this value and `x`. */ def -(x: Double): Double - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Byte): Int - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Short): Int - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Char): Int - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Int): Int - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Long): Long - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Float): Float - /** - * Returns the product of this value and `x`. - */ + /** Returns the product of this value and `x`. */ def *(x: Double): Double - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Byte): Int - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Short): Int - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Char): Int - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Int): Int - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Long): Long - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Float): Float - /** - * Returns the quotient of this value and `x`. - */ + /** Returns the quotient of this value and `x`. */ def /(x: Double): Double - /** - * Returns 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 - /** - * Returns 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 - /** - * Returns 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 - /** - * Returns 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 - /** - * Returns 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 - /** - * Returns 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 - /** - * Returns 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 override def getClass(): Class[Byte] = null } object Byte extends AnyValCompanion { - /** The smallest value representable as a Byte. - */ + /** The smallest value representable as a Byte. */ final val MinValue = java.lang.Byte.MIN_VALUE - /** The largest value representable as a Byte. - */ + /** The largest value representable as a Byte. */ final val MaxValue = java.lang.Byte.MAX_VALUE /** Transform a value type into a boxed reference type. @@ -625,12 +465,10 @@ object Byte extends AnyValCompanion { */ def unbox(x: java.lang.Object): Byte = x.asInstanceOf[java.lang.Byte].byteValue() - /** The String representation of the scala.Byte companion object. - */ + /** The String representation of the scala.Byte companion object. */ override def toString = "object scala.Byte" - - /** Language mandated coercions from Byte to "wider" types. - */ + /** Language mandated coercions from Byte to "wider" types. */ + import scala.language.implicitConversions implicit def byte2short(x: Byte): Short = x.toShort implicit def byte2int(x: Byte): Int = x.toInt implicit def byte2long(x: Byte): Long = x.toLong |