Home Reference Source
public class | source

Role

Role

Static Method Summary

Static Public Methods
public static

contain(roles: Role[], aRole: Role): Boolean

Checks if a collection of roles contain a role.

public static

subtract(roles: Role[], aRole: Role): Role[]

Removes a role to a collection of roles.

public static

union(roles: Role[], aRole: Role): Role[]

Adds a role to a collection of roles without duplication.

Constructor Summary

Public Constructor
public

constructor(name: String)

Constructs a new Role object.

Member Summary

Public Members
public get

name: String

Role name

Static Public Methods

public static contain(roles: Role[], aRole: Role): Boolean source

Checks if a collection of roles contain a role.

Params:

NameTypeAttributeDescription
roles Role[]

collection of role

aRole Role

target role

Return:

Boolean

public static subtract(roles: Role[], aRole: Role): Role[] source

Removes a role to a collection of roles.

Params:

NameTypeAttributeDescription
roles Role[]

collection of roles

aRole Role

role to be removed

Return:

Role[]

public static union(roles: Role[], aRole: Role): Role[] source

Adds a role to a collection of roles without duplication.

Params:

NameTypeAttributeDescription
roles Role[]

collection of roles

aRole Role

role to be added

Return:

Role[]

Public Constructors

public constructor(name: String) source

Constructs a new Role object.

Params:

NameTypeAttributeDescription
name String

role name

Public Members

public get name: String source

Role name