LEXICAL_ORDER
Deprecated
Warning since 2.1
Error since 2.4
Use naturalOrder<Uuid>() instead
Replace with
import kotlin.comparisons.naturalOrder
naturalOrder<Uuid>()A Comparator that lexically orders uuids.
Note: Uuid is a Comparable type, and its compareTo function establishes lexical order. LEXICAL_ORDER was introduced when Uuids were not comparable. It is now deprecated and will be removed in a future release. Instead, use naturalOrder<Uuid>(), which is equivalent to LEXICAL_ORDER.
This comparator compares the given two 128-bit uuids bit by bit sequentially, starting from the most significant bit to the least significant. uuid a is considered less than b if, at the first position where corresponding bits of the two uuids differ, the bit in a is zero and the bit in b is one. Conversely, a is considered greater than b if, at the first differing position, the bit in a is one and the bit in b is zero. If no differing bits are found, the two uuids are considered equal.
The result of the comparison of uuids a and b by this comparator is equivalent to:
a.toString().compareTo(b.toString())