Methods
addNewWorker(FireWorker)
Adds a new FireWorker instance to the workers array.
Parameters:
Name | Type | Description |
---|---|---|
FireWorker |
FireWorker |
Provide an instance of the class FireWorker. |
getAllWorkersByRole(role) → {Array.<Worker>}
Returns an array containing all of the workers with the specified role.
Parameters:
Name | Type | Description |
---|---|---|
role |
string |
The role to search with. |
getWorkerByID(id)
Returns a worker with the specified ID.
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
The id of the user you want to get. |
removeWorker(id) → {FireWorker}
A function to remove a FireWorker from the list. The FireWorker must be available to be removed.
Parameters:
Name | Type | Description |
---|---|---|
id |
number |