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
| Name | Type |
|---|---|
iterable? | DependencyGraphResource[] | DependencyGraphResourceSet |
Returns
Defined in
Properties
_map
• Private Readonly _map: Map\<string, DependencyGraphResource>
Defined in
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
Methods
[iterator]
▸ [iterator](): IterableIterator\<DependencyGraphResource>
Returns
IterableIterator\<DependencyGraphResource>
Defined in
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
| Name | Type | Description |
|---|---|---|
resource | DependencyGraphResource | The resource to add to the DependencyGraphResourceSet object. |
Returns
The DependencyGraphResourceSet object with added resource.
Defined in
clear
▸ clear(): void
This method removes all resources from this set.
Returns
void
Defined in
delete
▸ delete(resource): boolean
This method removes a specified resource from this set, if it is in the set.
Parameters
| Name | Type | Description |
|---|---|---|
resource | DependencyGraphResource | The resource to remove from DependencyGraphResourceSet. |
Returns
boolean
Returns true if resource was already in DependencyGraphResourceSet; otherwise false.
Defined in
forEach
▸ forEach(callbackfn, thisArg?): void
Executes a provided function once per each resource in the DependencyGraphResourceSet, in insertion order.
Parameters
| Name | Type |
|---|---|
callbackfn | (value: DependencyGraphResource, key: string, map: Map\<string, DependencyGraphResource>) => void |
thisArg? | any |
Returns
void
Defined in
getKey
▸ getKey(resource): string
Parameters
| Name | Type |
|---|---|
resource | DependencyGraphResource |
Returns
string
Defined in
has
▸ has(resource): boolean
This method returns a boolean indicating whether a resource exists in this DependencyGraphResourceSet or not.
Parameters
| Name | Type | Description |
|---|---|---|
resource | DependencyGraphResource | The resource to test for presence in the DependencyGraphResourceSet object. |
Returns
boolean
true if the resource exists in the DependencyGraphResourceSet object; otherwise false.
Defined in
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.