PermissionKey

sealed class PermissionKey<T>

A key representing a typed permission entry.

Subclasses define how to parse and format values shown in menus.

Parameters

displayName

name of permission shown in menus

Inheritors

Types

Link copied to clipboard

BoolType represents boolean permissions that are displayed as "On"/"Off" or "Enabled"/"Disabled".

Link copied to clipboard
class EnumType<E : Enum<E>>(name: String, values: Array<E>, displaySelector: (E) -> String) : Group.PermissionKey<E>

EnumType represents permissions backed by an enum. It maps between enum entries and their display strings.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun parseFromMenu(text: String): T

Parse the permission value from the menu text representation.

Link copied to clipboard
abstract fun toMenuText(value: T): String

Convert a value to the text representation shown in menus.