Class Unique
java.lang.Object
de.uplanet.lucy.server.auxiliaries.Unique
Utility class to create unique identifiers and names.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest wether the given string is a GUID.newGuid()Create a new GUID.newIdValue(String p_strKey) Deterministically create a new ID attribute value from the given key.intCreate a new GUID and return it's absolute hash code.Create a new unique variable name with the prefixl_idfollowed by up to nineteen decimal digits.newVariableName(String p_strPrefix) Create a new unique variable name with a specified prefix followed by up to nineteen decimal digits.
-
Constructor Details
-
Unique
public Unique()Constructor.
-
-
Method Details
-
newGuid
Create a new GUID.- Returns:
- The new GUID's string representation.
-
newUniqueInt
public int newUniqueInt()Create a new GUID and return it's absolute hash code.- Returns:
- A unique integer.
-
isGuid
Test wether the given string is a GUID.- Parameters:
p_strId- The string to test.- Returns:
trueif the given string is a GUID,falseotherwise.
-
newIdValue
Deterministically create a new ID attribute value from the given key.- Parameters:
p_strKey- A key.- Returns:
ID_+<GUID>.
-
newVariableName
Create a new unique variable name with the prefixl_idfollowed by up to nineteen decimal digits.- Returns:
- The newly created unique variable name.
-
newVariableName
Create a new unique variable name with a specified prefix followed by up to nineteen decimal digits.- Parameters:
p_strPrefix- The prefix to be used.- Returns:
- The newly created unique variable name.
-