public final class Sampler extends Object
Constructor and Description |
---|
Sampler() |
Modifier and Type | Method and Description |
---|---|
String |
getEmailDomain() |
String |
nextFirstName()
Returns a random first name from the internal list.
|
<T> T |
nextInArray(T[] array)
Returns the next item in the array.
|
<T> T |
nextInList(List<T> list)
Returns the next item in the list.
|
int |
nextInt(int min,
int max)
Return an integer value between min and max.
|
String |
nextLastName()
Returns a random last name from the internal list.
|
long |
nextLong(long min,
long max)
Return a long value between min and max.
|
PSMember |
nextMember()
Generate a new PageSeeder member with random names and email.
|
void |
setEmailDomain(String domain)
Set the email domain to use for the sampler.
|
public void setEmailDomain(String domain)
domain
- the email domainpublic String getEmailDomain()
public String nextFirstName()
public String nextLastName()
public int nextInt(int min, int max)
min
- The minimum value (inclusive)max
- The max value (exclusive)public long nextLong(long min, long max)
min
- The minimum value (inclusive)max
- The max value (exclusive)public <T> T nextInList(List<T> list)
T
- The type of object in the list.list
- the listpublic <T> T nextInArray(T[] array)
T
- The type of object in the array.array
- the array to take object frompublic PSMember nextMember()
Copyright © 2016 Allette Systems. All rights reserved.