PermissionSet

Efficiently stores a permission set

Constructors

Link copied to clipboard

Constructs set from any Iterable

Link copied to clipboard
fun PermissionSet(vararg flags: Permission)

Constructs set from array

Link copied to clipboard
fun PermissionSet(flags: String)

Constructs set from permission string

Link copied to clipboard
fun PermissionSet(flags: ULong)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun contains(element: Permission): Boolean

Check permission in the set

Link copied to clipboard
open override fun containsAll(elements: Collection<Permission>): Boolean

Check all permissions in the set

Link copied to clipboard
open override fun isEmpty(): Boolean

Check set contains any permission

Extensions

Link copied to clipboard
operator fun PermissionSet.minus(permission: Permission): PermissionSet

Returns a set containing all permissions of the original set except the given permission.

operator fun PermissionSet.minus(permissions: Array<out Permission>): PermissionSet

Returns a set containing all permissions of the original set except the permissions contained in the given permissions array.

operator fun PermissionSet.minus(permissions: Iterable<Permission>): PermissionSet
operator fun PermissionSet.minus(permissions: PermissionSet): PermissionSet

Returns a set containing all permissions of the original set except the permissions contained in the given permissions collection.

Link copied to clipboard
operator fun PermissionSet.plus(permission: Permission): PermissionSet

Returns a set containing all permissions of the original set and then the given permission if it isn't already in this set.

operator fun PermissionSet.plus(permissions: Array<out Permission>): PermissionSet

Returns a set containing all permissions of the original set and then the given permissions array, which aren't already in this set.

operator fun PermissionSet.plus(permissions: Iterable<Permission>): PermissionSet
operator fun PermissionSet.plus(permissions: PermissionSet): PermissionSet

Returns a set containing all permissions of the original set and then the given permissions collection, which aren't already in this set.