public class SquidID extends Object implements Serializable, Comparable<SquidID>
Constructor and Description |
---|
SquidID()
Constructs a new random SquidID.
|
SquidID(long low,
long high)
Constructs a fixed SquidID with the given low and high 64-bit longs.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SquidID o) |
boolean |
equals(Object o) |
long |
getLeastSignificantBits()
Gets the least-significant bits, also accessible by the field low.
|
long |
getMostSignificantBits()
Gets the most-significant bits, also accessible by the field high.
|
int |
hashCode() |
static void |
randomize()
Makes the IDs generated after calling this non-repeatable, with a random 1024-bit seed.
|
static SquidID |
randomUUID()
Gets a new random SquidID, the same as calling the no-argument constructor.
|
static void |
stabilize()
Makes the IDs generated after calling this repeatable, with the same IDs generated in order after this is called.
|
String |
toString() |
public SquidID()
public SquidID(long low, long high)
low
- the least-significant bits of the IDhigh
- the most-significant bits of the IDpublic static SquidID randomUUID()
public static void stabilize()
public static void randomize()
public long getLeastSignificantBits()
public long getMostSignificantBits()
public int compareTo(SquidID o)
compareTo
in interface Comparable<SquidID>
Copyright © 2012–2016. All rights reserved.