mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
@@ -355,13 +355,13 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
|||||||
}
|
}
|
||||||
// time_high_and_version
|
// time_high_and_version
|
||||||
builder.append(digits(mostSigBits, 4));
|
builder.append(digits(mostSigBits, 4));
|
||||||
if (false == isSimple)
|
if (!isSimple)
|
||||||
{
|
{
|
||||||
builder.append('-');
|
builder.append('-');
|
||||||
}
|
}
|
||||||
// variant_and_sequence
|
// variant_and_sequence
|
||||||
builder.append(digits(leastSigBits >> 48, 4));
|
builder.append(digits(leastSigBits >> 48, 4));
|
||||||
if (false == isSimple)
|
if (!isSimple)
|
||||||
{
|
{
|
||||||
builder.append('-');
|
builder.append('-');
|
||||||
}
|
}
|
||||||
@@ -419,13 +419,9 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
|
|||||||
@Override
|
@Override
|
||||||
public int compareTo(UUID val)
|
public int compareTo(UUID val)
|
||||||
{
|
{
|
||||||
// The ordering is intentionally set up so that the UUIDs
|
|
||||||
// can simply be numerically compared as two numbers
|
|
||||||
return (this.mostSigBits < val.mostSigBits ? -1 : //
|
return (this.mostSigBits < val.mostSigBits ? -1 : //
|
||||||
(this.mostSigBits > val.mostSigBits ? 1 : //
|
(this.mostSigBits > val.mostSigBits ? 1 : //
|
||||||
(this.leastSigBits < val.leastSigBits ? -1 : //
|
(Long.compare(this.leastSigBits, val.leastSigBits))));
|
||||||
(this.leastSigBits > val.leastSigBits ? 1 : //
|
|
||||||
0))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user