com.mitteloupe.randomgenkt.FieldDataProviderFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of randomgenkt Show documentation
Show all versions of randomgenkt Show documentation
Initialize instances of any class with generated data.
The newest version!
package com.mitteloupe.randomgenkt
import com.mitteloupe.randomgenkt.fielddataprovider.ShortFieldDataProvider
import java.util.Date
import kotlin.reflect.KClass
interface FieldDataProviderFactory {
val booleanFieldDataProvider: FieldDataProvider
val byteFieldDataProvider: FieldDataProvider
val sequentialIntegerFieldDataProvider: FieldDataProvider
val uuidFieldDataProvider: FieldDataProvider
val dateFieldDataProvider: FieldDataProvider
val loremIpsumFieldDataProvider: FieldDataProvider
fun getExplicitFieldDataProvider(
value: VALUE_TYPE
): FieldDataProvider
fun getGenericListFieldDataProvider(
fieldValueTypes: List
): FieldDataProvider
fun getByteArrayFieldDataProvider(size: Int): FieldDataProvider
fun getByteArrayFieldDataProvider(
minimumSize: Int,
maximumSize: Int
): FieldDataProvider
fun getDoubleFieldDataProvider(
minimum: Double = 0.0,
maximum: Double = 1.0
): FieldDataProvider
fun getFloatFieldDataProvider(
minimum: Float = 0.0f,
maximum: Float = 1.0f
): FieldDataProvider
fun getIntFieldDataProvider(
minimum: Int = Int.MIN_VALUE,
maximum: Int = Int.MAX_VALUE
): FieldDataProvider
fun getLongFieldDataProvider(
minimum: Long = Long.MIN_VALUE,
maximum: Long = Long.MAX_VALUE
): FieldDataProvider
fun getShortFieldDataProvider(
minimum: Short = Short.MIN_VALUE,
maximum: Short = Short.MAX_VALUE
): ShortFieldDataProvider
fun getSequentialIntegerFieldDataProvider(startValue: Int): FieldDataProvider
fun getRgbFieldDataProvider(provideAlpha: Boolean): FieldDataProvider
fun getDateFieldDataProvider(
earliestTimestamp: Long = 0L,
latestTimestamp: Long = Long.MAX_VALUE
): FieldDataProvider
fun getLoremIpsumFieldDataProvider(
minimumLength: Int,
maximumLength: Int = minimumLength,
paragraphDelimiter: String? = null
): FieldDataProvider
fun getWeightedFieldDataProvidersFieldDataProvider(
fieldDataProvider: FieldDataProvider
): FieldDataProvider
fun > getRandomEnumFieldDataProvider(
value: Class
): FieldDataProvider
fun > getRandomEnumFieldDataProvider(
value: KClass
): FieldDataProvider
fun getPaddedFieldDataProvider(
fieldDataProvider: FieldDataProvider,
minimumLength: Int,
paddingString: String
): FieldDataProvider
fun getCustomListFieldDataProvider(
fieldDataProvider: FieldDataProvider,
minimumInstances: Int,
maximumInstances: Int = minimumInstances
): FieldDataProvider>
}