Class Capabilities

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(opt_other?: Capabilities): Capabilities

constructor

Parameters

  • opt_other?: Capabilities optional

    Another set of capabilities to merge into this instance.

Returns

Capabilities

constructor(opt_other?: any): Capabilities

Parameters

  • opt_other?: any optional

Returns

Capabilities

Methods

public get(key: string): any

Parameters

  • key: string

    The capability to return.

Returns

any

The capability with the given key, or {@code null} if it has not been set.

public has(key: string): boolean

Parameters

  • key: string

    The capability to check.

Returns

boolean

Whether the specified capability is set.

public merge(other: Capabilities): Capabilities

Merges another set of capabilities into this instance. Any duplicates in the provided set will override those already set on this instance.

Parameters

  • other: Capabilities

    The capabilities to merge into this instance.

Returns

Capabilities

A self reference.

public merge(other: any): Capabilities

Parameters

  • other: any

Returns

Capabilities

public set(key: string, value: any): Capabilities

Parameters

  • key: string

    The capability to set.

  • value: any

    The capability value. Capability values must be JSON serializable. Pass {@code null} to unset the capability.

Returns

Capabilities

A self reference.

public toJSON(): any

Returns

any

The JSON representation of this instance.