Fix errors and indent in built-ins sources
This commit is contained in:
+7
-7
@@ -134,13 +134,13 @@ public final class Char : kotlin.Comparable<kotlin.Char> {
|
|||||||
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
||||||
public open fun toByte(): kotlin.Byte
|
public final fun toByte(): kotlin.Byte
|
||||||
public open fun toChar(): kotlin.Char
|
public final fun toChar(): kotlin.Char
|
||||||
public open fun toDouble(): kotlin.Double
|
public final fun toDouble(): kotlin.Double
|
||||||
public open fun toFloat(): kotlin.Float
|
public final fun toFloat(): kotlin.Float
|
||||||
public open fun toInt(): kotlin.Int
|
public final fun toInt(): kotlin.Int
|
||||||
public open fun toLong(): kotlin.Long
|
public final fun toLong(): kotlin.Long
|
||||||
public open fun toShort(): kotlin.Short
|
public final fun toShort(): kotlin.Short
|
||||||
|
|
||||||
public companion object Companion {
|
public companion object Companion {
|
||||||
/*primary*/ private constructor Companion()
|
/*primary*/ private constructor Companion()
|
||||||
|
|||||||
+7
-7
@@ -134,13 +134,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
|
|||||||
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
||||||
public open fun toByte(): kotlin.Byte
|
public final fun toByte(): kotlin.Byte
|
||||||
public open fun toChar(): kotlin.Char
|
public final fun toChar(): kotlin.Char
|
||||||
public open fun toDouble(): kotlin.Double
|
public final fun toDouble(): kotlin.Double
|
||||||
public open fun toFloat(): kotlin.Float
|
public final fun toFloat(): kotlin.Float
|
||||||
public open fun toInt(): kotlin.Int
|
public final fun toInt(): kotlin.Int
|
||||||
public open fun toLong(): kotlin.Long
|
public final fun toLong(): kotlin.Long
|
||||||
public open fun toShort(): kotlin.Short
|
public final fun toShort(): kotlin.Short
|
||||||
|
|
||||||
public companion object Companion {
|
public companion object Companion {
|
||||||
/*primary*/ private constructor Companion()
|
/*primary*/ private constructor Companion()
|
||||||
|
|||||||
+7
-7
@@ -134,13 +134,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
|
|||||||
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
||||||
public open fun toByte(): kotlin.Byte
|
public final fun toByte(): kotlin.Byte
|
||||||
public open fun toChar(): kotlin.Char
|
public final fun toChar(): kotlin.Char
|
||||||
public open fun toDouble(): kotlin.Double
|
public final fun toDouble(): kotlin.Double
|
||||||
public open fun toFloat(): kotlin.Float
|
public final fun toFloat(): kotlin.Float
|
||||||
public open fun toInt(): kotlin.Int
|
public final fun toInt(): kotlin.Int
|
||||||
public open fun toLong(): kotlin.Long
|
public final fun toLong(): kotlin.Long
|
||||||
public open fun toShort(): kotlin.Short
|
public final fun toShort(): kotlin.Short
|
||||||
|
|
||||||
public companion object Companion {
|
public companion object Companion {
|
||||||
/*primary*/ private constructor Companion()
|
/*primary*/ private constructor Companion()
|
||||||
|
|||||||
+7
-7
@@ -134,13 +134,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
|
|||||||
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
|
||||||
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
|
||||||
public open fun toByte(): kotlin.Byte
|
public final fun toByte(): kotlin.Byte
|
||||||
public open fun toChar(): kotlin.Char
|
public final fun toChar(): kotlin.Char
|
||||||
public open fun toDouble(): kotlin.Double
|
public final fun toDouble(): kotlin.Double
|
||||||
public open fun toFloat(): kotlin.Float
|
public final fun toFloat(): kotlin.Float
|
||||||
public open fun toInt(): kotlin.Int
|
public final fun toInt(): kotlin.Int
|
||||||
public open fun toLong(): kotlin.Long
|
public final fun toLong(): kotlin.Long
|
||||||
public open fun toShort(): kotlin.Short
|
public final fun toShort(): kotlin.Short
|
||||||
|
|
||||||
public companion object Companion {
|
public companion object Companion {
|
||||||
/*primary*/ private constructor Companion()
|
/*primary*/ private constructor Companion()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ package kotlin
|
|||||||
* Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are
|
* Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are
|
||||||
* represented as values of the primitive type `boolean`.
|
* represented as values of the primitive type `boolean`.
|
||||||
*/
|
*/
|
||||||
public class Boolean private () : Comparable<Boolean> {
|
public class Boolean private constructor() : Comparable<Boolean> {
|
||||||
/**
|
/**
|
||||||
* Returns the inverse of this boolean.
|
* Returns the inverse of this boolean.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ package kotlin
|
|||||||
* Represents a 16-bit Unicode character.
|
* Represents a 16-bit Unicode character.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `char`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `char`.
|
||||||
*/
|
*/
|
||||||
public class Char private () : Comparable<Char> {
|
public class Char private constructor() : Comparable<Char> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
@@ -46,19 +45,19 @@ public class Char private () : Comparable<Char> {
|
|||||||
public operator fun rangeTo(other: Char): CharRange
|
public operator fun rangeTo(other: Char): CharRange
|
||||||
|
|
||||||
/** Returns the value of this character as a `Byte`. */
|
/** Returns the value of this character as a `Byte`. */
|
||||||
public override fun toByte(): Byte
|
public fun toByte(): Byte
|
||||||
/** Returns the value of this character as a `Char`. */
|
/** Returns the value of this character as a `Char`. */
|
||||||
public override fun toChar(): Char
|
public fun toChar(): Char
|
||||||
/** Returns the value of this character as a `Short`. */
|
/** Returns the value of this character as a `Short`. */
|
||||||
public override fun toShort(): Short
|
public fun toShort(): Short
|
||||||
/** Returns the value of this character as a `Int`. */
|
/** Returns the value of this character as a `Int`. */
|
||||||
public override fun toInt(): Int
|
public fun toInt(): Int
|
||||||
/** Returns the value of this character as a `Long`. */
|
/** Returns the value of this character as a `Long`. */
|
||||||
public override fun toLong(): Long
|
public fun toLong(): Long
|
||||||
/** Returns the value of this character as a `Float`. */
|
/** Returns the value of this character as a `Float`. */
|
||||||
public override fun toFloat(): Float
|
public fun toFloat(): Float
|
||||||
/** Returns the value of this character as a `Double`. */
|
/** Returns the value of this character as a `Double`. */
|
||||||
public override fun toDouble(): Double
|
public fun toDouble(): Double
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ package kotlin
|
|||||||
* Nothing has no instances. You can use Nothing to represent "a value that never exists": for example,
|
* Nothing has no instances. You can use Nothing to represent "a value that never exists": for example,
|
||||||
* if a function has the return type of Nothing, it means that it never returns (always throws an exception).
|
* if a function has the return type of Nothing, it means that it never returns (always throws an exception).
|
||||||
*/
|
*/
|
||||||
public class Nothing private () {}
|
public class Nothing private constructor()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ package kotlin
|
|||||||
* Represents a 8-bit signed integer.
|
* Represents a 8-bit signed integer.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `byte`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `byte`.
|
||||||
*/
|
*/
|
||||||
public class Byte private () : Number, Comparable<Byte> {
|
public class Byte private constructor() : Number(), Comparable<Byte> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the minimum value an instance of Byte can have.
|
* A constant holding the minimum value an instance of Byte can have.
|
||||||
@@ -35,37 +35,42 @@ public class Byte private () : Number, Comparable<Byte> {
|
|||||||
public const val MAX_VALUE: Byte = 127
|
public const val MAX_VALUE: Byte = 127
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public override operator fun compareTo(other: Byte): Int
|
public override operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Short): Int
|
public operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Int): Int
|
public operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Long): Int
|
public operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Float): Int
|
public operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
@@ -168,7 +173,7 @@ public class Byte private () : Number, Comparable<Byte> {
|
|||||||
* Represents a 16-bit signed integer.
|
* Represents a 16-bit signed integer.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `short`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `short`.
|
||||||
*/
|
*/
|
||||||
public class Short private () : Number, Comparable<Short> {
|
public class Short private constructor() : Number(), Comparable<Short> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the minimum value an instance of Short can have.
|
* A constant holding the minimum value an instance of Short can have.
|
||||||
@@ -181,37 +186,42 @@ public class Short private () : Number, Comparable<Short> {
|
|||||||
public const val MAX_VALUE: Short = 32767
|
public const val MAX_VALUE: Short = 32767
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Byte): Int
|
public operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public override operator fun compareTo(other: Short): Int
|
public override operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Int): Int
|
public operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Long): Int
|
public operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Float): Int
|
public operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
@@ -314,7 +324,7 @@ public class Short private () : Number, Comparable<Short> {
|
|||||||
* Represents a 32-bit signed integer.
|
* Represents a 32-bit signed integer.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `int`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `int`.
|
||||||
*/
|
*/
|
||||||
public class Int private () : Number, Comparable<Int> {
|
public class Int private constructor() : Number(), Comparable<Int> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the minimum value an instance of Int can have.
|
* A constant holding the minimum value an instance of Int can have.
|
||||||
@@ -327,37 +337,42 @@ public class Int private () : Number, Comparable<Int> {
|
|||||||
public const val MAX_VALUE: Int = 2147483647
|
public const val MAX_VALUE: Int = 2147483647
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Byte): Int
|
public operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Short): Int
|
public operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public override operator fun compareTo(other: Int): Int
|
public override operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Long): Int
|
public operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Float): Int
|
public operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
@@ -475,7 +490,7 @@ public class Int private () : Number, Comparable<Int> {
|
|||||||
* Represents a 64-bit signed integer.
|
* Represents a 64-bit signed integer.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `long`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `long`.
|
||||||
*/
|
*/
|
||||||
public class Long private () : Number, Comparable<Long> {
|
public class Long private constructor() : Number(), Comparable<Long> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the minimum value an instance of Long can have.
|
* A constant holding the minimum value an instance of Long can have.
|
||||||
@@ -488,37 +503,42 @@ public class Long private () : Number, Comparable<Long> {
|
|||||||
public const val MAX_VALUE: Long = 9223372036854775807L
|
public const val MAX_VALUE: Long = 9223372036854775807L
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Byte): Int
|
public operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Short): Int
|
public operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Int): Int
|
public operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public override operator fun compareTo(other: Long): Int
|
public override operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Float): Int
|
public operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
@@ -636,7 +656,7 @@ public class Long private () : Number, Comparable<Long> {
|
|||||||
* Represents a single-precision 32-bit IEEE 754 floating point number.
|
* Represents a single-precision 32-bit IEEE 754 floating point number.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `float`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `float`.
|
||||||
*/
|
*/
|
||||||
public class Float private () : Number, Comparable<Float> {
|
public class Float private constructor() : Number(), Comparable<Float> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the smallest *positive* nonzero value of Float.
|
* A constant holding the smallest *positive* nonzero value of Float.
|
||||||
@@ -664,37 +684,42 @@ public class Float private () : Number, Comparable<Float> {
|
|||||||
public val NaN: Float
|
public val NaN: Float
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Byte): Int
|
public operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Short): Int
|
public operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Int): Int
|
public operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Long): Int
|
public operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public override operator fun compareTo(other: Float): Int
|
public override operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
@@ -789,7 +814,7 @@ public class Float private () : Number, Comparable<Float> {
|
|||||||
* Represents a double-precision 64-bit IEEE 754 floating point number.
|
* Represents a double-precision 64-bit IEEE 754 floating point number.
|
||||||
* On the JVM, non-nullable values of this type are represented as values of the primitive type `double`.
|
* On the JVM, non-nullable values of this type are represented as values of the primitive type `double`.
|
||||||
*/
|
*/
|
||||||
public class Double private () : Number, Comparable<Double> {
|
public class Double private constructor() : Number(), Comparable<Double> {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* A constant holding the smallest *positive* nonzero value of Double.
|
* A constant holding the smallest *positive* nonzero value of Double.
|
||||||
@@ -817,37 +842,42 @@ public class Double private () : Number, Comparable<Double> {
|
|||||||
public val NaN: Double
|
public val NaN: Double
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Byte): Int
|
public operator fun compareTo(other: Byte): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Short): Int
|
public operator fun compareTo(other: Short): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Int): Int
|
public operator fun compareTo(other: Int): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Long): Int
|
public operator fun compareTo(other: Long): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
*/
|
*/
|
||||||
public operator fun compareTo(other: Float): Int
|
public operator fun compareTo(other: Float): Int
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Compares this value with the specified value for order.
|
* Compares this value with the specified value for order.
|
||||||
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
* or a positive number if its greater than other.
|
* or a positive number if its greater than other.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
for (kind in PrimitiveType.onlyNumeric) {
|
for (kind in PrimitiveType.onlyNumeric) {
|
||||||
val className = kind.capitalized
|
val className = kind.capitalized
|
||||||
generateDoc(kind)
|
generateDoc(kind)
|
||||||
out.println("public class $className private () : Number, Comparable<$className> {")
|
out.println("public class $className private constructor() : Number(), Comparable<$className> {")
|
||||||
|
|
||||||
out.print(" companion object ")
|
out.print(" companion object ")
|
||||||
if (kind == PrimitiveType.FLOAT || kind == PrimitiveType.DOUBLE) {
|
if (kind == PrimitiveType.FLOAT || kind == PrimitiveType.DOUBLE) {
|
||||||
@@ -95,8 +95,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
* A constant holding the "not a number" value of $className.
|
* A constant holding the "not a number" value of $className.
|
||||||
*/
|
*/
|
||||||
public val NaN: $className
|
public val NaN: $className
|
||||||
}
|
}""")
|
||||||
""")
|
|
||||||
}
|
}
|
||||||
if (kind == PrimitiveType.INT || kind == PrimitiveType.LONG || kind == PrimitiveType.SHORT || kind == PrimitiveType.BYTE) {
|
if (kind == PrimitiveType.INT || kind == PrimitiveType.LONG || kind == PrimitiveType.SHORT || kind == PrimitiveType.BYTE) {
|
||||||
val (minValue, maxValue) = primitiveConstants(kind)
|
val (minValue, maxValue) = primitiveConstants(kind)
|
||||||
@@ -110,8 +109,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
* A constant holding the maximum value an instance of $className can have.
|
* A constant holding the maximum value an instance of $className can have.
|
||||||
*/
|
*/
|
||||||
public const val MAX_VALUE: $className = $maxValue
|
public const val MAX_VALUE: $className = $maxValue
|
||||||
}
|
}""")
|
||||||
""")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generateCompareTo(kind)
|
generateCompareTo(kind)
|
||||||
@@ -139,11 +137,12 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
|||||||
|
|
||||||
private fun generateCompareTo(thisKind: PrimitiveType) {
|
private fun generateCompareTo(thisKind: PrimitiveType) {
|
||||||
for (otherKind in PrimitiveType.onlyNumeric) {
|
for (otherKind in PrimitiveType.onlyNumeric) {
|
||||||
out.println("/**")
|
out.println("""
|
||||||
out.println(" * Compares this value with the specified value for order.")
|
/**
|
||||||
out.println(" * Returns zero if this value is equal to the specified other value, a negative number if its less than other, ")
|
* Compares this value with the specified value for order.
|
||||||
out.println(" * or a positive number if its greater than other.")
|
* Returns zero if this value is equal to the specified other value, a negative number if its less than other,
|
||||||
out.println(" */")
|
* or a positive number if its greater than other.
|
||||||
|
*/""")
|
||||||
out.print(" public ")
|
out.print(" public ")
|
||||||
if (otherKind == thisKind) out.print("override ")
|
if (otherKind == thisKind) out.print("override ")
|
||||||
out.println("operator fun compareTo(other: ${otherKind.capitalized}): Int")
|
out.println("operator fun compareTo(other: ${otherKind.capitalized}): Int")
|
||||||
|
|||||||
Reference in New Issue
Block a user