Interface RandomUtils


  • public interface RandomUtils
    • Method Detail

      • randomString

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

        default java.lang.String randomString​(int length,
                                              java.lang.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

        default java.lang.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

        java.lang.String randomString​(int minLength,
                                      int maxLength,
                                      java.lang.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

        java.lang.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