public class StringFactory extends AbstractCandidateFactory<String>
| Constructor and Description |
|---|
StringFactory(char[] alphabet,
int stringLength) |
| Modifier and Type | Method and Description |
|---|---|
String |
generateRandomCandidate(Random rng)
Generates a random string of a pre-configured length.
|
generateInitialPopulation, generateInitialPopulationpublic StringFactory(char[] alphabet,
int stringLength)
alphabet - The set of characters that can legally occur within a
string generated by this factory.stringLength - The fixed length of all strings generated by this
factory.public String generateRandomCandidate(Random rng)
rng - A source of randomness used to select characters to make up
the string.