public class Xeger
extends java.lang.Object
| Constructor and Description |
|---|
Xeger(java.lang.String regex)
As
Xeger(String, java.util.Random), creating a Random instance
implicityly. |
Xeger(java.lang.String regex,
java.util.Random random)
Constructs a new instance, accepting the regular expression and the randomizer.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generate()
Generates a random String that is guaranteed to match the regular expression passed to the constructor.
|
public Xeger(java.lang.String regex,
java.util.Random random)
regex - The regular expression. (Not null.)random - The object that will randomize the way the String is generated. (Not null.)java.lang.IllegalArgumentException - If the regular expression is invalid.public Xeger(java.lang.String regex)
Xeger(String, java.util.Random), creating a Random instance
implicityly.