Package africa.absa.inception.core.util
Class RandomStringGenerator
- java.lang.Object
-
- africa.absa.inception.core.util.RandomStringGenerator
-
public class RandomStringGenerator extends Object
The RandomStringGenerator class is a utility class that provides the capability to generate random alphanumeric strings.- Author:
- Marcus Portmann
-
-
Constructor Summary
Constructors Constructor Description RandomStringGenerator()Constructs a new RandomStringGenerator that can be used to generate session identifiers.RandomStringGenerator(int length)Constructs a new RandomStringGenerator.RandomStringGenerator(int length, Random random)Constructs a new RandomStringGenerator.RandomStringGenerator(int length, Random random, String symbols)Constructs a new RandomStringGenerator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringnextString()Generate the next random alphanumeric string.
-
-
-
Constructor Detail
-
RandomStringGenerator
public RandomStringGenerator()
Constructs a new RandomStringGenerator that can be used to generate session identifiers.
-
RandomStringGenerator
public RandomStringGenerator(int length)
Constructs a new RandomStringGenerator.- Parameters:
length- the length of the random strings that should be generated
-
RandomStringGenerator
public RandomStringGenerator(int length, Random random)Constructs a new RandomStringGenerator.- Parameters:
length- the length of the random strings that should be generatedrandom- the random number generator
-
RandomStringGenerator
public RandomStringGenerator(int length, Random random, String symbols)Constructs a new RandomStringGenerator.- Parameters:
length- the length of the random strings that should be generatedrandom- the random number generatorsymbols- the symbols to use when generating the random string
-
-
Method Detail
-
nextString
public String nextString()
Generate the next random alphanumeric string.- Returns:
- the next random alphanumeric string
-
-