public class GUID extends java.lang.Object implements ID, java.lang.Comparable
The identifier is composed of:
[ address ] - [ process id ] - [ time ] - [ counter ] - [ time ] - [ counter ]
|------- UID --------| |------- UID --------|
|---------------------- VMID -----------------------|
VMID,
UID,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected int |
hashCode
The hash code of this GUID
|
(package private) static long |
serialVersionUID
The serial version id, @since 1.6
|
private java.lang.String |
toString |
protected UID |
uid
The unique identifier
|
protected VMID |
vmid
The virtual machine identifier
|
| Modifier | Constructor and Description |
|---|---|
|
GUID()
Construct a new GUID.
|
protected |
GUID(GUID guid)
Copy a GUID.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
asString()
Returns a GUID as a string.
|
java.lang.Object |
clone()
Returns a copy of this GUID.
|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object obj)
Check if the given object is equal to this GUID.
|
UID |
getUID()
Get the UID portion of this GUID.
|
VMID |
getVMID()
Get the VMID portion of this GUID.
|
int |
hashCode()
Return the hash code of this GUID.
|
java.lang.String |
toString()
Return a string representation of this GUID.
|
static final long serialVersionUID
protected final VMID vmid
protected final UID uid
protected final int hashCode
private transient java.lang.String toString
public GUID()
protected GUID(GUID guid)
guid - GUID to copy.public final VMID getVMID()
public final UID getUID()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
A GUID is equal to another GUID if the VMID and UID portions are equal.
equals in class java.lang.Objectobj - Object to test equality with.public java.lang.Object clone()
clone in class java.lang.Objectpublic static java.lang.String asString()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable