SettingsType

sealed class SettingsType<Type : Settings>

Describes the type of a Settings.

NOTE The companion object of the associated Settings is expected to extend SettingsType for the implementation of Settings.

Author

Richard Arriaga

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

true if this SettingsType allows multiple Settings of this type to be exported to the same settings file; false otherwise.

Link copied to clipboard
val key: String

The String key that uniquely identifies the associated Settings.

Functions

Link copied to clipboard
abstract fun extract(obj: JSONObject): Type

Extract the Type from the provided JSONObject.

Link copied to clipboard
fun extractAndProcess(obj: JSONObject, then: (Type?, Throwable?) -> Unit)

Extract the Type from the provided JSONObject and pass it to the provided lambda.