CompositeKeyHashCode


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.

Summary

Extension functions

Long

Converts a CompositeKeyHashCode to a 64-bit Long.

Cmn
String

Returns a String representation of a CompositeKeyHashCode with the specified radix.

Cmn

Extension functions

fun CompositeKeyHashCode.toLong(): Long

Converts a CompositeKeyHashCode to a 64-bit Long. This may be higher precision than the underlying type.

fun CompositeKeyHashCode.toString(radix: Int): String

Returns a String representation of a CompositeKeyHashCode with the specified radix.

Throws
kotlin.IllegalArgumentException

when radix is not a valid radix for number to string conversion.