public class NameGenerator extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
NameGenerator.NameData |
Modifier and Type | Field and Description |
---|---|
(package private) double |
CHANCE_FEMALE
Chance for female name.
|
(package private) static NameGenerator |
instance
The singleton class instance.
|
(package private) ArrayList<NameGenerator.NameData> |
nameList
Table of saving throw targets.
|
(package private) String |
NAMES_FILE
Name of file with names.
|
Modifier | Constructor and Description |
---|---|
protected |
NameGenerator()
Constructor (read from dedicated file).
|
Modifier and Type | Method and Description |
---|---|
static NameGenerator |
getInstance()
Access the singleton class instance.
|
String |
getRandom()
Get a random name.
|
final String NAMES_FILE
final double CHANCE_FEMALE
static NameGenerator instance
ArrayList<NameGenerator.NameData> nameList
protected NameGenerator() throws IOException
IOException
public static NameGenerator getInstance()
public String getRandom()