public class Xeger extends Object
| Constructor and Description |
|---|
Xeger(String regex)
As
Xeger(String, java.util.Random), creating a
Random instance implicityly. |
Xeger(String regex,
Random random)
Constructs a new instance, accepting the regular expression and the randomizer.
|
| Modifier and Type | Method and Description |
|---|---|
String |
generate()
Generates a random String that is guaranteed to match the regular expression passed
to the constructor.
|
Random |
getRandom() |
void |
setRandom(Random random) |
public Xeger(String regex, Random random)
regex - The regular expression. (Not null.)random - The object that will randomize the way the String is generated. (Not
null.)IllegalArgumentException - If the regular expression is invalid.public Xeger(String regex)
Xeger(String, java.util.Random), creating a
Random instance implicityly.regex - as stringCopyright © 2016–2020 Spring. All rights reserved.