Package dev.voidframework.core.lang
Class CUID
java.lang.Object
dev.voidframework.core.lang.CUID
- All Implemented Interfaces:
Serializable,Comparable<CUID>
Collision-resistant ID optimized for horizontal scaling and performance.
- See Also:
-
Method Summary
-
Method Details
-
randomCUID
Generates a new random CUID.- Returns:
- Newly generated CUID
-
fromString
Creates aCUIDfrom the string standard representation.- Parameters:
cuidAsString- A string that specifies aCUID- Returns:
- A
CUIDwith the specified value - Throws:
IllegalArgumentException- If the string is not conform
-
isValid
Checks theCUIDfrom the string standard representation.- Parameters:
cuidAsString- A string that specifies aCUID- Returns:
trueIf the string is not conform, otherwise,false
-
compareTo
- Specified by:
compareToin interfaceComparable<CUID>
-
toString
-
equals
-
hashCode
public int hashCode()
-