public class NGuid extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static Guid |
Empty |
protected static String |
EMPTY_GUID_VALUE |
protected Guid |
guid |
protected UUID |
uuid |
Constructor and Description |
---|
NGuid() |
NGuid(byte[] guid,
boolean keepByteOrder) |
NGuid(String candidate) |
NGuid(UUID uuid) |
Modifier and Type | Method and Description |
---|---|
static NGuid |
createGuidFromString(String candidate) |
boolean |
equals(Object other) |
String |
getStrRepresentationOfGuid(byte[] inguid,
boolean keepByteOrder)
Gets a string representation of GUID
|
UUID |
getUuid() |
Guid |
getValue() |
int |
hashCode() |
static Guid |
NewGuid() |
String |
toString() |
protected static final String EMPTY_GUID_VALUE
public static final Guid Empty
protected UUID uuid
protected Guid guid
public NGuid()
public NGuid(byte[] guid, boolean keepByteOrder)
public NGuid(String candidate)
public NGuid(UUID uuid)
public static Guid NewGuid()
public Guid getValue()
public UUID getUuid()
public String getStrRepresentationOfGuid(byte[] inguid, boolean keepByteOrder)
inguid
- byte array containing the GUID data.keepByteOrder
- determines if to keep the byte order in the string representation or not. For some systems as MSSQL
the bytes order should be swapped before converting to String, and for other systems (such as
ActiveDirectory) it should be kept.Copyright © 2012. All Rights Reserved.