class Builder: Any

Fields

Name Description
var locale: String

Sets the FakerConfig.locale when creating an instance of FakerConfig with this Builder. Default: "en".

var random: Random

Sets the FakerConfig.random when creating an instance of FakerConfig with this Builder. Default: "en".

var randomSeed: Long?

Sets the seed for FakerConfig.random. If specified, the random property will be ignored when creating an instance of FakerConfig with this Builder. Default: null.

var uniqueGeneratorRetryLimit: Int

Sets the FakerConfig.uniqueGeneratorRetryLimit when creating an instance of FakerConfig with this Builder. Default: 100.

Methods

withLocale

fun withLocale(locale: String): Builder

Parameters

Name Description
locale: String

ReturnValue

Name Description
Builder

withRandom

fun withRandom(random: Random): Builder

Parameters

Name Description
random: Random

ReturnValue

Name Description
Builder

withRandomSeed

fun withRandomSeed(seed: Long): Builder

Parameters

Name Description
seed: Long

ReturnValue

Name Description
Builder

withUniqueGeneratorRetryLimit

fun withUniqueGeneratorRetryLimit(retryLimit: Int): Builder

Parameters

Name Description
retryLimit: Int

ReturnValue

Name Description
Builder

build

fun build(): FakerConfig

ReturnValue

Name Description
FakerConfig

randomClassInstance

fun randomClassInstance(configurator: RandomProviderConfig.()->Unit)

Parameters

Name Description
configurator: RandomProviderConfig.()->Unit

ReturnValue

Name Description
Unit