All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mitteloupe.randomgenkt.fielddataprovider.DoubleFieldDataProvider.kt Maven / Gradle / Ivy

The newest version!
package com.mitteloupe.randomgenkt.fielddataprovider

import com.mitteloupe.randomgenkt.FieldDataProvider
import java.util.Random

class DoubleFieldDataProvider(
    private val random: Random,
    private val minimum: Double = 0.0,
    private val maximum: Double = 1.0
) : FieldDataProvider() {
    override fun invoke(instance: OUTPUT_TYPE?) =
        random.nextDouble() * (maximum - minimum) + minimum
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy