Package net.datafaker.service
Class RandomService
java.lang.Object
net.datafaker.service.RandomService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhex()
hex
(int length) hex
(int length, boolean upper) boolean
double
double
nextDouble
(double min, double max) float
int
nextInt()
int
nextInt
(int n) nextInt
(int min, int max) long
nextLong()
long
nextLong
(long n) long
nextLong
(long min, long max) byte[]
nextRandomBytes
(int numberOfBytes)
-
Constructor Details
-
RandomService
public RandomService()Uses a default shared random. -
RandomService
- Parameters:
random
- If null is passed in, a default Random is assigned
-
-
Method Details
-
nextInt
public int nextInt() -
nextInt
public int nextInt(int n) -
nextInt
-
nextFloat
public float nextFloat() -
nextLong
public long nextLong() -
nextLong
public long nextLong(long n) -
nextLong
public long nextLong(long min, long max) -
nextDouble
public double nextDouble() -
nextDouble
public double nextDouble(double min, double max) -
nextBoolean
public boolean nextBoolean() -
nextRandomBytes
public byte[] nextRandomBytes(int numberOfBytes) -
hex
-
hex
-
hex
-
getRandomInternal
-