com.filenet.rm.bds
Class GUID
- java.lang.Object
-
- com.filenet.rm.bds.GUID
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class GUID extends java.lang.Object implements java.lang.CloneableThis class encapsulates the concept of a GUID
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringEMPTY_GUIDDefault empty GUIDStringvalue.
-
Constructor Summary
Constructors Constructor and Description GUID(byte[] guidBytes)Constructor for GUID class.GUID(java.lang.String guidString)Constructor for GUID class.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.Objectclone()Overrides the protectedObject.clone()in order to implement theCloneableinterface.static GUIDcreateGUID()Static method to create a new instance of a GUID and auto-generate its internal value.booleanequals(java.lang.Object o)inthashCode()static booleanisValidGuidString(java.lang.String guidString)Helper method to determine if a given string is a valid GUID string.java.lang.StringtoString()Returns GUID value as a String in the format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where each 'x' character is a hexidecimal digit ([0-9A-F]).
-
-
-
Field Detail
-
EMPTY_GUID
public static final java.lang.String EMPTY_GUID
Default empty GUIDStringvalue.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GUID
public GUID(java.lang.String guidString)
Constructor for GUID class.- Parameters:
guidString- a String of the format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where each 'x' character is a hexidecimal digit ([0-9a-fA-F]). Ifnullor an empty string, then the GUID will be initialized to the EMPTY_GUID constant value.
-
GUID
public GUID(byte[] guidBytes)
Constructor for GUID class.- Parameters:
guidBytes-byte[]of GUID data.
-
-
Method Detail
-
createGUID
public static GUID createGUID()
Static method to create a new instance of a GUID and auto-generate its internal value.- Returns:
- a newly created GUID instance.
-
clone
public java.lang.Object clone()
Overrides the protectedObject.clone()in order to implement theCloneableinterface.- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns GUID value as a String in the format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where each 'x' character is a hexidecimal digit ([0-9A-F]).- Overrides:
toStringin classjava.lang.Object- Returns:
- GUID
Stringvalue.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isValidGuidString
public static boolean isValidGuidString(java.lang.String guidString)
Helper method to determine if a given string is a valid GUID string.- Parameters:
guidString-Stringto validate.- Returns:
trueif is a valid GUID string;falseotherwise.
-
-