public final class Guid
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
GUID_BYTE_SIZE
number of bytes in a GUID
|
static int |
GUID_STRING_SIZE
length of GUID string representation
|
static int |
GUID_STRING_SIZE_NEW
length of GUID compact string reprentation
|
Constructor and Description |
---|
Guid()
Creates a Guid object
|
Guid(byte[] byte_array)
Construct a Guid from a byte array
|
Guid(java.lang.String guidHexString)
Construct a Guid from its string representation
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones a Guid object
|
boolean |
equals(Guid guid)
Compare the Guid for equality with this guid
|
boolean |
equals(java.lang.Object o)
Compare the Object for equality with this guid
|
byte[] |
getBytes()
return the byte array form of the Guid
|
int |
hashCode()
return the hashcode of this object for hashing purposes
|
static void |
main(java.lang.String[] argv)
main function used for testing retained from old implementation for compatibility
|
static Guid |
newInstance()
generates a new Guid Object.
|
java.lang.String |
toString()
Retrieves the Guid in a string format
|
public static final int GUID_BYTE_SIZE
public static final int GUID_STRING_SIZE
public static final int GUID_STRING_SIZE_NEW
public Guid()
public Guid(java.lang.String guidHexString)
guidHexString
- a non null Hex string representing a Globally Unique Identifier. The string can be either in the expanded or compact formpublic Guid(byte[] byte_array)
byte_array
- an array of bytes representing a GUID. This constructor will validate the length of the byte array before proceeding.public static Guid newInstance()
public byte[] getBytes()
public final java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to be compared for equalitypublic boolean equals(Guid guid)
guid
- object to be compared for equaitypublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public static void main(java.lang.String[] argv)