Say I have two instances of UUID:
uuid1 = UUID.randomUUID();
uuid2 = UUID.randomUUID();
If these two comparisons are such that uuid1less than uuid2ie,
uuid1.compareTo(uuid2)
it is always true that their string representations are compared to give the same result, i.e.
uuid1.toString().compareTo(uuid2.toString())
source
share