Package com.saperion.common.lang.id
Class Guid
java.lang.Object
com.saperion.common.lang.id.Guid
- All Implemented Interfaces:
- Id,- Serializable
A globally unique identifier, as an implementation of a RFC4122 type 4 UUID.
 An instance of Guid can be used in several threads concurrently.
 
- Author:
- agz
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfinal StringReturns the string-representation of thisId.final StringReturns a 32 byte representation of thisGuid, that is analogous to the standard 36 byte representation but without the separating "-"-characters.final StringReturns the standard 36 byte representation of thisGuid.inthashCode()protected ObjecttoString()
- 
Constructor Details- 
Guidpublic Guid()Creates a newGuid, representing an already initialized, valid globally unique id-value.
- 
GuidCreates a newGuid, initialized with the id-value represented by the specified string. The specified string may be the standard 36 bytes representation or a reduced 32 bytes representation where the separating "-"-characters are omitted. For letter-characters both upper and lower case is accepted. The specified string must not benull.- Parameters:
- string- string representation of a guid
- See Also:
 
 
- 
- 
Method Details- 
readResolve
- 
getStringReturns the string-representation of thisId. Returns the standard 36 bytes representation of thisGuid.
- 
getString32Returns a 32 byte representation of thisGuid, that is analogous to the standard 36 byte representation but without the separating "-"-characters. Letters are in upper case always.- Returns:
- 32 byte representation of this Guid
- See Also:
 
- 
getString36Returns the standard 36 byte representation of thisGuid. Letters are in upper case always.- Returns:
- 36 byte standard representation of this Guid
- See Also:
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-