Can be replaced with 'Long.compare'
This commit is contained in:
parent
a30622b460
commit
a5925cf2db
|
|
@ -421,11 +421,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||||
{
|
{
|
||||||
// The ordering is intentionally set up so that the UUIDs
|
// The ordering is intentionally set up so that the UUIDs
|
||||||
// can simply be numerically compared as two numbers
|
// can simply be numerically compared as two numbers
|
||||||
return (this.mostSigBits < val.mostSigBits ? -1 : //
|
return Long.compare(this.leastSigBits, val.leastSigBits);
|
||||||
(this.mostSigBits > val.mostSigBits ? 1 : //
|
|
||||||
(this.leastSigBits < val.leastSigBits ? -1 : //
|
|
||||||
(this.leastSigBits > val.leastSigBits ? 1 : //
|
|
||||||
0))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue