abstract class Number
Superclass for all platform classes representing numeric values.
Number() Superclass for all platform classes representing numeric values. |
abstract fun toByte(): Byte Returns the value of this number as a Byte, which may involve rounding or truncation. | |
abstract fun toChar(): Char Returns the Char with the numeric value equal to this number, truncated to 16 bits if appropriate. | |
abstract fun toDouble(): Double Returns the value of this number as a Double, which may involve rounding. | |
abstract fun toFloat(): Float Returns the value of this number as a Float, which may involve rounding. | |
abstract fun toInt(): Int Returns the value of this number as an Int, which may involve rounding or truncation. | |
abstract fun toLong(): Long Returns the value of this number as a Long, which may involve rounding or truncation. | |
abstract fun toShort(): Short Returns the value of this number as a Short, which may involve rounding or truncation. |
open operator fun equals(other: Any?): Boolean Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements: | |
open fun hashCode(): Int Returns a hash code value for the object. The general contract of hashCode is: | |
open fun toString(): String Returns a string representation of the object. |
class Byte : Number, Comparable<Byte> Represents a 8-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type | |
class Double : Number, Comparable<Double> 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 | |
class Float : Number, Comparable<Float> 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 | |
class Int : Number, Comparable<Int> Represents a 32-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type | |
class Long : Number, Comparable<Long> Represents a 64-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type | |
class Short : Number, Comparable<Short> Represents a 16-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type |
© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html