random with seed

This commit is contained in:
Florian Steurer 2016-04-03 17:36:44 +02:00
parent 0d5b515a47
commit 6c2d71d005

View File

@ -11,6 +11,7 @@ public final class PlaceholderType extends UnifyType{
protected static final HashSet<String> EXISTING_PLACEHOLDERS = new HashSet<String>();
protected static String nextName = "gen_";
protected static Random rnd = new Random(43558747548978L);
public PlaceholderType(String name) {
super(name);
@ -30,7 +31,7 @@ public final class PlaceholderType extends UnifyType{
* Returns random char between 'a' and 'z'
*/
private static char randomChar() {
return (char) (new Random().nextInt(22) + 97);
return (char) (rnd.nextInt(22) + 97);
}
@Override