ItemList
The ItemList
class collects items and then arranges them into an array
by priority.
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
Add an item to the list. |
|
public |
Get the content of an item. |
|
public |
Check whether an item is present in the list. |
|
public |
Check whether the list is empty. |
|
public |
Merge another list's items into this one. |
|
public |
Remove an item from the list. |
|
public |
Replace an item in the list, only if it is already present. |
|
public |
Convert the list into an array of item content arranged by priority. |
Public Constructors
public constructor() source
Public Methods
public add(key: string, content: undefined, priority: number): undefined source
Add an item to the list.
public get(key: string): undefined source
Get the content of an item.
Params:
Name | Type | Attribute | Description |
key | string |
public has(key: string): boolean source
Check whether an item is present in the list.
Params:
Name | Type | Attribute | Description |
key | string |
public merge(items: undefined): undefined source
Merge another list's items into this one.
Params:
Name | Type | Attribute | Description |
items | undefined |
public remove(key: string): undefined source
Remove an item from the list.
Params:
Name | Type | Attribute | Description |
key | string |