Koncierge

Entrypoint for koncierge's functionality

class Koncierge

Constructors

Koncierge
Link copied to clipboard
fun Koncierge()

Functions

changeDateGen
Link copied to clipboard

Change the date generator function. Defaults to java.time.ZonedDateTime.now

fun changeDateGen(f: (Unit) -> ZonedDateTime)
changeRandomGen
Link copied to clipboard

Change the random generator function. Defaults to kotlin.random.Random.nextFloat.

Caveat: Should behave like kotlin.random.Random.nextFloat returning a value uniformly distributed between 0 (inclusive) and 1 (exclusive)

fun changeRandomGen(f: (Unit) -> Float)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
evaluate
Link copied to clipboard

Evaluates an experiment given a JSON context.

If the context does not match an experiment, it will default that the context is not part of that variant.

fun evaluate(experiment: KonciergeExperiment, context: String): KonciergeExperimentResult
hashCode
Link copied to clipboard
open override fun hashCode(): Int
parse
Link copied to clipboard

Parses a JSON experiment definition.

fun parse(definition: String): KonciergeExperiment
toString
Link copied to clipboard
open override fun toString(): String