Short (original) (raw)
Represents a 16-bit signed integer.
Since Kotlin
1.0
Represents a 16-bit signed integer.
Since Kotlin
1.1
Represents a 16-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type short
.
Since Kotlin
1.0
Represents a 16-bit signed integer.
Since Kotlin
1.3
Represents a 16-bit signed integer.
Since Kotlin
1.8
Represents a 16-bit signed integer.
Since Kotlin
1.8
Types
Functions
Performs a bitwise AND operation between the two values.
Ensures that this value is not less than the specified minimumValue.
Ensures that this value is not greater than the specified maximumValue.
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 it's less than other, or a positive number if it's greater than other.
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 it's less than other, or a positive number if it's greater than other.
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 it's less than other, or a positive number if it's greater than other.
actual open operator external override fun compareTo(other: Short): Int
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 it's less than other, or a positive number if it's greater than other.
actual open inline operator override fun compareTo(other: Short): Int
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 it's less than other, or a positive number if it's greater than other.
actual open inline operator override fun compareTo(other: Short): Int
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 it's less than other, or a positive number if it's greater than other.
Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.
Counts the number of consecutive most significant bits that are zero in the binary representation of this Short number.
Counts the number of set bits in the binary representation of this Short number.
Counts the number of consecutive least significant bits that are zero in the binary representation of this Short number.
Returns this value decremented by one.
Returns this value decremented by one.
Returns this value decremented by one.
actual operator external fun dec(): Short
Returns this value decremented by one.
actual inline operator fun dec(): Short
Returns this value decremented by one.
actual inline operator fun dec(): Short
Returns this value decremented by one.
expect operator fun div(other: Byte): Int
expect operator fun div(other: Int): Int
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
actual operator fun div(other: Byte): Int
actual operator fun div(other: Int): Int
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
actual inline operator fun div(other: Byte): Int
actual inline operator fun div(other: Int): Int
actual inline operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Int
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
actual inline operator fun div(other: Byte): Int
actual inline operator fun div(other: Int): Int
actual inline operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Int
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
actual inline operator fun div(other: Byte): Int
actual inline operator fun div(other: Int): Int
actual inline operator fun div(other: Long): Long
actual inline operator fun div(other: Short): Int
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
Returns a progression from this value down to and including the specified to value with the step -1.
Divides this value by the other value, flooring the result to an integer that is closer to negative infinity.
Returns this value incremented by one.
Returns this value incremented by one.
Returns this value incremented by one.
actual operator external fun inc(): Short
Returns this value incremented by one.
actual inline operator fun inc(): Short
Returns this value incremented by one.
actual inline operator fun inc(): Short
Returns this value incremented by one.
Inverts the bits in this value.
Subtracts the other value from this value.
Subtracts the other value from this value.
Subtracts the other value from this value.
actual inline operator fun minus(other: Byte): Int
actual inline operator fun minus(other: Int): Int
Subtracts the other value from this value.
actual inline operator fun minus(other: Byte): Int
actual inline operator fun minus(other: Int): Int
Subtracts the other value from this value.
actual inline operator fun minus(other: Byte): Int
actual inline operator fun minus(other: Int): Int
Subtracts the other value from this value.
Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).
Performs a bitwise OR operation between the two values.
expect operator fun plus(other: Int): Int
Adds the other value to this value.
actual operator fun plus(other: Int): Int
Adds the other value to this value.
Adds the other value to this value.
actual inline operator fun plus(other: Byte): Int
actual inline operator fun plus(other: Int): Int
actual inline operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Int
Adds the other value to this value.
actual inline operator fun plus(other: Byte): Int
actual inline operator fun plus(other: Int): Int
actual inline operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Int
Adds the other value to this value.
actual inline operator fun plus(other: Byte): Int
actual inline operator fun plus(other: Int): Int
actual inline operator fun plus(other: Long): Long
actual inline operator fun plus(other: Short): Int
Adds the other value to this value.
Creates a range from this value to the specified other value.
Creates a range from this value to the specified other value.
Creates a range from this value to the specified other value.
Creates a range from this value to the specified other value.
Creates a range from this value to the specified other value.
Creates a range from this value to the specified other value.
Creates a range from this value up to but excluding the specified other value.
Creates a range from this value up to but excluding the specified other value.
Creates a range from this value up to but excluding the specified other value.
Creates a range from this value up to but excluding the specified other value.
Creates a range from this value up to but excluding the specified other value.
Creates a range from this value up to but excluding the specified other value.
expect operator fun rem(other: Byte): Int
expect operator fun rem(other: Int): Int
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
actual operator fun rem(other: Byte): Int
actual operator fun rem(other: Int): Int
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
actual inline operator fun rem(other: Byte): Int
actual inline operator fun rem(other: Int): Int
actual inline operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Int
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
actual inline operator fun rem(other: Byte): Int
actual inline operator fun rem(other: Int): Int
actual inline operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Int
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
actual inline operator fun rem(other: Byte): Int
actual inline operator fun rem(other: Int): Int
actual inline operator fun rem(other: Long): Long
actual inline operator fun rem(other: Short): Int
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
Rotates the binary representation of this Short number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.
Rotates the binary representation of this Short number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.
Returns a number having a single bit set in the position of the most significant set bit of this Short number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Short number, or zero, if this number is zero.
Multiplies this value by the other value.
Multiplies this value by the other value.
Multiplies this value by the other value.
actual inline operator fun times(other: Byte): Int
actual inline operator fun times(other: Int): Int
Multiplies this value by the other value.
actual inline operator fun times(other: Byte): Int
actual inline operator fun times(other: Int): Int
Multiplies this value by the other value.
actual inline operator fun times(other: Byte): Int
actual inline operator fun times(other: Int): Int
Multiplies this value by the other value.
Formats this Short
value using the specified format.
Returns a string representation of this Short value in the specified radix.
Returns a string representation of this Short value in the specified radix.
Returns a string representation of this Short value in the specified radix.
Returns a string representation of this Short value in the specified radix.
Returns a string representation of this Short value in the specified radix.
Returns a string representation of this Short value in the specified radix.
Returns the negative of this value.
Returns the negative of this value.
Returns the negative of this value.
Returns the negative of this value.
Returns the negative of this value.
Returns the negative of this value.
Returns a range from this value up to but excluding the specified to value.
Performs a bitwise XOR operation between the two values.
Thanks for your feedback!