Class Rand

java.lang.Object
one.pkg.tiny.utils.Rand

public class Rand extends Object
  • 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.