Interface RandomUtils


public interface RandomUtils
  • Method Details

    • randomString

      String randomString(int length)
      Generate a random string using alphanumeric characters
      Parameters:
      length - length of the resulting random string
      Returns:
      randomly generated string
    • randomString

      String randomString(int length, String chars)
      Generate a random string using the supplied characters
      Parameters:
      length - length of the resulting random string
      chars - the characters to use to generate the string
      Returns:
      randomly generated string
    • randomString

      String randomString(int length, RandomUtils.CharacterSet... characterSets)
      Generate a random string using the supplied RandomUtils.CharacterSet
      Parameters:
      length - length of the resulting random string
      characterSets - the list CharacterSet to use to generate the string
      Returns:
      randomly generated string
    • randomString

      String randomString(int minLength, int maxLength, String chars)
      Generate a random string using the supplied characters
      Parameters:
      minLength - the inclusive minimum length of the generated string
      maxLength - the inclusive maximum length of the generated string
      chars - the characters to use to generate the string
      Returns:
      randomly generated string
    • randomString

      String randomString(int minLength, int maxLength, RandomUtils.CharacterSet... characterSets)
      Generate a random string using the supplied RandomUtils.CharacterSet
      Parameters:
      minLength - the inclusive minimum length of the generated string
      maxLength - the inclusive maximum length of the generated string
      characterSets - the list CharacterSet to use to generate the string
      Returns:
      randomly generated string