UserStyleSetting.Option

public abstract class UserStyleSetting.Option


Represents a choice within a style setting which can either be an option from the list or a an arbitrary value depending on the nature of the style setting.

Summary

Nested types

public final class UserStyleSetting.Option.Id

Machine readable identifier for Options.

Public constructors

This constructor is unused (the parent class is sealed), but is required to make tooling happy.

Public methods

boolean
equals(Object other)
final @NonNull Collection<@NonNull UserStyleSetting>

The list of child UserStyleSettings, if any, forming a hierarchy of UserStyleSettings.

final @NonNull UserStyleSetting.Option.Id

Machine readable Id for the style setting.

int
@NonNull String

Public constructors

Option

Added in 1.0.0
public Option(@NonNull UserStyleSetting.Option.Id id)

This constructor is unused (the parent class is sealed), but is required to make tooling happy.

Public methods

equals

public boolean equals(Object other)

getChildSettings

Added in 1.1.0
public final @NonNull Collection<@NonNull UserStyleSettinggetChildSettings()

The list of child UserStyleSettings, if any, forming a hierarchy of UserStyleSettings. These must be in UserStyleSchema.userStyleSettings. Child UserStyleSettings are deemed to be active if the Option is selected by the UserStyle. This is particularly important is there are multiple ComplicationSlotsUserStyleSettings, only one of which is allowed to be active at any time.

getId

Added in 1.0.0
public final @NonNull UserStyleSetting.Option.Id getId()

Machine readable Id for the style setting. Identifier for the option (or the option itself for CustomValueUserStyleSetting.CustomValueOption), must be unique within the UserStyleSetting. Short ids are encouraged.

hashCode

public int hashCode()

toString

public @NonNull String toString()