public class FirstNameRandomField extends Object implements RandomField
RandomField representing a String that should look like a first name.| Modifier and Type | Class and Description |
|---|---|
static class |
FirstNameRandomField.Gender
Enum for setting the Gender of the first name.
|
RND| Constructor and Description |
|---|
FirstNameRandomField()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FirstNameRandomField |
gender(FirstNameRandomField.Gender newGender)
Sets the gender of the generated first names.
|
FirstNameRandomField.Gender |
getGender()
Returns the gender of the generated first names.
|
double |
getNullProbability()
Returns the probability for this field returning null.
|
String |
nextValue()
Returns a random value.
|
FirstNameRandomField |
nullProbability(double newNullProbability)
Sets the probability for this field returning null.
|
void |
setGender(FirstNameRandomField.Gender gender)
Sets the gender of the generated first names.
|
void |
setNullProbability(double nullProbability)
Sets the probability for this field returning null.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic String nextValue()
RandomFieldnextValue in interface RandomFieldpublic FirstNameRandomField.Gender getGender()
public FirstNameRandomField gender(FirstNameRandomField.Gender newGender)
newGender - the gender; cannot be nullpublic void setGender(FirstNameRandomField.Gender gender)
gender - the gender; cannot be nullpublic double getNullProbability()
nextValue() is null, if it is 1 then every nextValue() is null.public FirstNameRandomField nullProbability(double newNullProbability)
nextValue() is null, if it is 1 then every nextValue() is null.newNullProbability - the probability between 0 and 1public void setNullProbability(double nullProbability)
nextValue() is null, if it is 1 then every nextValue() is null.nullProbability - the probability between 0 and 1Copyright © 2020. All rights reserved.