MutableUserStyle


class MutableUserStyle : Iterable


A mutable UserStyle. This must be converted back to a UserStyle by calling toUserStyle.

Summary

Public functions

operator UserStyleSetting.Option?

Returns the UserStyleSetting.Option for settingId if there is one or null otherwise.

operator UserStyleSetting.Option?

Returns the UserStyleSetting.Option for setting if there is one or null otherwise.

open operator Iterator<Map.Entry<UserStyleSettingUserStyleSetting.Option>>

Iterator over the elements of the user style.

operator Unit

Sets the UserStyleSetting.Option for the setting with the given settingId to the option with the given optionId.

operator Unit

Sets the UserStyleSetting.Option for the setting with the given settingId to the given option.

operator Unit

Sets the UserStyleSetting.Option for setting to the option with the given optionId.

operator Unit

Sets the UserStyleSetting.Option for setting to the given option.

open String
UserStyle

Converts this instance to an immutable UserStyle with the same mapping.

Public properties

Int

The number of entries in the style.

Public functions

get

Added in 1.0.0
operator fun get(settingId: UserStyleSetting.Id): UserStyleSetting.Option?

Returns the UserStyleSetting.Option for settingId if there is one or null otherwise. Note this is an O(n) operation.

get

Added in 1.0.0
operator fun get(setting: UserStyleSetting): UserStyleSetting.Option?

Returns the UserStyleSetting.Option for setting if there is one or null otherwise.

iterator

Added in 1.0.0
open operator fun iterator(): Iterator<Map.Entry<UserStyleSettingUserStyleSetting.Option>>

Iterator over the elements of the user style.

set

Added in 1.0.0
operator fun set(settingId: UserStyleSetting.Id, optionId: UserStyleSetting.Option.Id): Unit

Sets the UserStyleSetting.Option for the setting with the given settingId to the option with the given optionId.

Throws
kotlin.IllegalArgumentException

if settingId is not in the schema or if optionId is unrecognized.

set

Added in 1.0.0
operator fun set(settingId: UserStyleSetting.Id, option: UserStyleSetting.Option): Unit

Sets the UserStyleSetting.Option for the setting with the given settingId to the given option.

Parameters
settingId: UserStyleSetting.Id

The UserStyleSetting.Id of the UserStyleSetting we're setting the option for, must be in the schema.

option: UserStyleSetting.Option

the UserStyleSetting.Option we're setting. Must be a valid option for settingId.

Throws
kotlin.IllegalArgumentException

if settingId is not in the schema or if option is invalid for settingId.

set

Added in 1.0.0
operator fun set(setting: UserStyleSetting, optionId: UserStyleSetting.Option.Id): Unit

Sets the UserStyleSetting.Option for setting to the option with the given optionId.

Parameters
setting: UserStyleSetting

The UserStyleSetting we're setting the optionId for, must be in the schema.

optionId: UserStyleSetting.Option.Id

the UserStyleSetting.Option.Id for the UserStyleSetting.Option we're setting.

Throws
kotlin.IllegalArgumentException

if setting is not in the schema or if optionId is unrecognized.

set

Added in 1.0.0
operator fun set(setting: UserStyleSetting, option: UserStyleSetting.Option): Unit

Sets the UserStyleSetting.Option for setting to the given option.

Parameters
setting: UserStyleSetting

The UserStyleSetting we're setting the option for, must be in the schema.

option: UserStyleSetting.Option

the UserStyleSetting.Option we're setting. Must be a valid option for setting.

Throws
kotlin.IllegalArgumentException

if setting is not in the schema or if option is invalid for setting.

toString

open fun toString(): String

toUserStyle

Added in 1.0.0
fun toUserStyle(): UserStyle

Converts this instance to an immutable UserStyle with the same mapping.

Public properties

size

Added in 1.0.0
val sizeInt

The number of entries in the style.