Skip to content

BooleanProperty

Xavier Gouchet edited this page Feb 17, 2020 · 1 revision

class BooleanProperty : ForgeryProperty<Boolean>

This class implements a ReadOnlyProperty, forging a random boolean with a given probability of being true.

Parameters

probability - the probability the boolean will be true (default 0.5f)

Constructors

<init>

BooleanProperty(probability: Float = Forge.HALF_PROBABILITY)

This class implements a ReadOnlyProperty, forging a random boolean with a given probability of being true.

Parameters

probability - the probability the boolean will be true (default 0.5f)

Functions

getForgery

fun getForgery(forge: Forge): Boolean

Inheritdoc

Companion Object Functions

booleanForgery

fun booleanForgery(probability: Float= Forge.HALF_PROBABILITY):ForgeryProperty<Boolean>

Creates a ReadOnlyProperty that will forge a random boolean with the given probability of being true.

Parameters

probability - the probability the boolean will be true (default 0.5f)

Clone this wiki locally