Skip to main content

Class: DependencyGraphResourceSet

The DependencyGraphResourceSet object lets you store unique dependency graph resources.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new DependencyGraphResourceSet(iterable?): DependencyGraphResourceSet

Parameters

NameType
iterable?DependencyGraphResource[] | DependencyGraphResourceSet

Returns

DependencyGraphResourceSet

Defined in

src/utils/set.ts:11

Properties

_map

Private Readonly _map: Map\<string, DependencyGraphResource>

Defined in

src/utils/set.ts:9

Accessors

size

get size(): number

The size accessor property of DependencyGraphResourceSet instances returns the number of (unique) resources in this set.

Returns

number

Defined in

src/utils/set.ts:28

Methods

[iterator]

[iterator](): IterableIterator\<DependencyGraphResource>

Returns

IterableIterator\<DependencyGraphResource>

Defined in

src/utils/set.ts:33


add

add(resource): DependencyGraphResourceSet

This method inserts a new element with a specified value in to this set, if there isn't an element with the same value already in this set.

Parameters

NameTypeDescription
resourceDependencyGraphResourceThe resource to add to the DependencyGraphResourceSet object.

Returns

DependencyGraphResourceSet

The DependencyGraphResourceSet object with added resource.

Defined in

src/utils/set.ts:43


clear

clear(): void

This method removes all resources from this set.

Returns

void

Defined in

src/utils/set.ts:54


delete

delete(resource): boolean

This method removes a specified resource from this set, if it is in the set.

Parameters

NameTypeDescription
resourceDependencyGraphResourceThe resource to remove from DependencyGraphResourceSet.

Returns

boolean

Returns true if resource was already in DependencyGraphResourceSet; otherwise false.

Defined in

src/utils/set.ts:64


forEach

forEach(callbackfn, thisArg?): void

Executes a provided function once per each resource in the DependencyGraphResourceSet, in insertion order.

Parameters

NameType
callbackfn(value: DependencyGraphResource, key: string, map: Map\<string, DependencyGraphResource>) => void
thisArg?any

Returns

void

Defined in

src/utils/set.ts:78


getKey

getKey(resource): string

Parameters

NameType
resourceDependencyGraphResource

Returns

string

Defined in

src/utils/set.ts:110


has

has(resource): boolean

This method returns a boolean indicating whether a resource exists in this DependencyGraphResourceSet or not.

Parameters

NameTypeDescription
resourceDependencyGraphResourceThe resource to test for presence in the DependencyGraphResourceSet object.

Returns

boolean

true if the resource exists in the DependencyGraphResourceSet object; otherwise false.

Defined in

src/utils/set.ts:97


values

values(): IterableIterator\<DependencyGraphResource>

This method returns an iterator object that contains the resources of this DependencyGraphResourceSet in insertion order.

Returns

IterableIterator\<DependencyGraphResource>

A new iterable iterator object.

Defined in

src/utils/set.ts:106