Package one.pkg.tiny.utils
Class Rand
java.lang.Object
one.pkg.tiny.utils.Rand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateRandomId
(@org.jetbrains.annotations.Range(from=1L, to=56L) int length) Generates a random alphanumeric string of the specified length.
-
Constructor Details
-
Rand
public Rand()
-
-
Method Details
-
generateRandomId
public static String generateRandomId(@org.jetbrains.annotations.Range(from=1L, to=56L) int length) throws IllegalArgumentException Generates a random alphanumeric string of the specified length.- Parameters:
length
- the length of the generated string. Must be between 1 and 56, inclusive.- Returns:
- a randomly generated string of the specified length.
- Throws:
IllegalArgumentException
- if the length is not between 1 and 56.
-