Add deprecated xxxValue() extensions to Number for migration.

This commit is contained in:
Ilya Gorbunov
2015-10-20 17:29:13 +03:00
parent c9d8a15965
commit d3d239bc1b
@@ -34,3 +34,21 @@ public fun Double.isFinite(): Boolean = !isInfinite() && !isNaN()
*/
public fun Float.isFinite(): Boolean = !isInfinite() && !isNaN()
@Deprecated("Use toInt() instead.", ReplaceWith("toInt()"))
public fun Number.intValue(): Int = toInt()
@Deprecated("Use toLong() instead.", ReplaceWith("toLong()"))
public fun Number.longValue(): Long = toLong()
@Deprecated("Use toShort() instead.", ReplaceWith("toShort()"))
public fun Number.shortValue(): Short = toShort()
@Deprecated("Use toByte() instead.", ReplaceWith("toByte()"))
public fun Number.byteValue(): Byte = toByte()
@Deprecated("Use toDouble() instead.", ReplaceWith("toDouble()"))
public fun Number.doubleValue(): Double = toDouble()
@Deprecated("Use toFloat() instead.", ReplaceWith("toFloat()"))
public fun Number.floatValue(): Float = toFloat()