ObservationBuilder

DSL builder used with Storage.observe to declare which keys should be observed together with their default values.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun boolean(key: String, default: Boolean = false): Keystone.ObservationBuilder

Declares a Boolean key to observe.

Link copied to clipboard
fun booleans(vararg keys: String, default: Boolean = false): Keystone.ObservationBuilder

Declares multiple Boolean keys to observe.

Link copied to clipboard
fun double(key: String, default: Double = 0.0): Keystone.ObservationBuilder

Declares a Double key to observe.

Link copied to clipboard
fun doubles(vararg keys: String, default: Double = 0.0): Keystone.ObservationBuilder

Declares multiple Double keys to observe.

Link copied to clipboard
fun float(key: String, default: Float = 0.0f): Keystone.ObservationBuilder

Declares a Float key to observe.

Link copied to clipboard
fun floats(vararg keys: String, default: Float = 0.0f): Keystone.ObservationBuilder

Declares multiple Float keys to observe.

Link copied to clipboard
fun ifBoolean(key: String, condition: Boolean, default: Boolean = false): Keystone.ObservationBuilder

Conditionally declares a Boolean key to observe.

Link copied to clipboard
fun ifDouble(key: String, condition: Boolean, default: Double = 0.0): Keystone.ObservationBuilder

Conditionally declares a Double key to observe.

Link copied to clipboard
fun ifFloat(key: String, condition: Boolean, default: Float = 0.0f): Keystone.ObservationBuilder

Conditionally declares a Float key to observe.

Link copied to clipboard
fun ifInt(key: String, condition: Boolean, default: Int = 0): Keystone.ObservationBuilder

Conditionally declares an Int key to observe.

Link copied to clipboard
fun ifLong(key: String, condition: Boolean, default: Long = 0): Keystone.ObservationBuilder

Conditionally declares a Long key to observe.

Link copied to clipboard
fun ifString(key: String, condition: Boolean, default: String = ""): Keystone.ObservationBuilder

Conditionally declares a String key to observe.

Link copied to clipboard
fun int(key: String, default: Int = 0): Keystone.ObservationBuilder

Declares an Int key to observe.

Link copied to clipboard
fun ints(vararg keys: String, default: Int = 0): Keystone.ObservationBuilder

Declares multiple Int keys to observe.

Link copied to clipboard
fun long(key: String, default: Long = 0): Keystone.ObservationBuilder

Declares a Long key to observe.

Link copied to clipboard
fun longs(vararg keys: String, default: Long = 0): Keystone.ObservationBuilder

Declares multiple Long keys to observe.

Link copied to clipboard

Declares a String key to observe.

Link copied to clipboard
fun strings(vararg keys: String, default: String = ""): Keystone.ObservationBuilder

Declares multiple String keys to observe.