CompositeKeyHashCode
-
Cmn
class CompositeKeyHashCode
-
androidN
actual typealias CompositeKeyHashCode = Long
The return type of currentCompositeKeyHashCode
. On most platforms this is a Long
but may be a different type if the platform target does not support Long
efficiently (such as JavaScript).
A CompositeKeyHashCode
is a hash that correlates to a location in a Composition. Hashes are stable, meaning that if the same composition hierarchy is recomposed or recreated, it will have the same hashes. Hashes are very likely, but not guaranteed, to be unique.
If you need to convert this value to an Int, it is strongly recommended to use hashCode
instead of toInt
. Truncating this value instead of hashing it can greatly impact a value's effectiveness as a hash.
See also | |
---|---|
currentCompositeKeyHashCode |
Summary
Extension functions |
||
---|---|---|
Long |
Converts a |
Cmn
|
String |
CompositeKeyHashCode.toString(radix: Int) Returns a String representation of a |
Cmn
|
Extension functions
toLong
fun CompositeKeyHashCode.toLong(): Long
Converts a CompositeKeyHashCode
to a 64-bit Long. This may be higher precision than the underlying type.
toString
fun CompositeKeyHashCode.toString(radix: Int): String
Returns a String representation of a CompositeKeyHashCode
with the specified radix
.
Throws | |
---|---|
kotlin.IllegalArgumentException |
when |