interface UInt384Value<T : UInt384Value<T>!> : Comparable<T> (source)
Represents a 384-bit (48 bytes) unsigned integer value.
A UInt384Value is an unsigned integer value stored with 48 bytes, so whose value can range between 0 and 2^384-1.
This interface defines operations for value types with a 384-bit precision range. The methods provided by this interface take parameters of the same type (and also long. This provides type safety by ensuring calculations cannot mix different UInt384Value types.
Where only a pure numerical 384-bit value is required, UInt384 should be used.
It is strongly advised to extend BaseUInt384Value rather than implementing this interface directly. Doing so provides type safety in that quantities of different units cannot be mixed accidentally.
add |
Returns a value that is abstract fun add(value: T): Tabstract fun add(value: Long): T |
addExact |
Returns a value that is open fun addExact(value: T): Topen fun addExact(value: Long): T |
addMod |
Returns a value equivalent to abstract fun addMod(value: T, modulus: UInt384!): Tabstract fun addMod(value: Long, modulus: UInt384!): Tabstract fun addMod(value: Long, modulus: Long): T |
bitLength |
Returns the number of bits following and including the highest-order ("leftmost") one-bit open fun bitLength(): Int |
divide |
Returns a value that is abstract fun divide(value: T): Tabstract fun divide(value: Long): T |
fitsInt |
Returns true if this value fits an int open fun fitsInt(): Boolean |
fitsLong |
Returns true if this value fits in a long. open fun fitsLong(): Boolean |
intValue |
Returns the value as an int. open fun intValue(): Int |
isZero |
Returns true is this is 0. open fun isZero(): Boolean |
mod |
Returns a value that is abstract fun mod(modulus: UInt384!): Tabstract fun mod(modulus: Long): T |
multiply |
Returns a value that is abstract fun multiply(value: T): Tabstract fun multiply(value: Long): T |
multiplyMod |
Returns a value that is abstract fun multiplyMod(value: T, modulus: UInt384!): Tabstract fun multiplyMod(value: Long, modulus: UInt384!): Tabstract fun multiplyMod(value: Long, modulus: Long): T |
numberOfLeadingZeros |
Returns the number of zero bits preceding the highest-order ("leftmost") one-bit open fun numberOfLeadingZeros(): Int |
pow |
Returns a value that is abstract fun pow(exponent: UInt384!): Tabstract fun pow(exponent: Long): T |
subtract |
Returns a value that is abstract fun subtract(value: T): Tabstract fun subtract(value: Long): T |
subtractExact |
Returns a value that is open fun subtractExact(value: T): Topen fun subtractExact(value: Long): T |
toBigInteger |
Returns this value as a open fun toBigInteger(): BigInteger! |
toBytes |
Returns the value as bytes abstract fun toBytes(): Bytes48! |
toHexString |
This value represented as an hexadecimal string. open fun toHexString(): String! |
toLong |
Returns this value as a long. open fun toLong(): Long |
toMinimalBytes |
Retuns the value as bytes without any leading zero bytes. abstract fun toMinimalBytes(): Bytes! |
toShortHexString |
Returns this value represented as a minimal hexadecimal string (without any leading zero). open fun toShortHexString(): String! |
toUInt384 |
Convert this value to a abstract fun toUInt384(): UInt384! |
BaseUInt384Value |
Base class for abstract class BaseUInt384Value<T : UInt384Value<T>!> : UInt384Value<T> |
UInt384 |
An unsigned 384-bit precision number. This is a raw class UInt384 : UInt384Value<UInt384!> |