collect-your-stuff 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +1492 -1488
  2. package/browser/collect-your-stuff.js +19292 -19268
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +37 -37
  5. package/dist/collections/arrayable/ArrayElement.js +71 -71
  6. package/dist/collections/arrayable/Arrayable.d.ts +109 -108
  7. package/dist/collections/arrayable/Arrayable.js +196 -195
  8. package/dist/collections/arrayable/Arrayable.min.js +1 -1
  9. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +47 -47
  10. package/dist/collections/doubly-linked-list/DoubleLinker.js +77 -77
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +114 -113
  12. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +275 -257
  13. package/dist/collections/doubly-linked-list/DoublyLinkedList.min.js +1 -1
  14. package/dist/collections/linked-list/LinkedList.d.ts +110 -109
  15. package/dist/collections/linked-list/LinkedList.js +241 -232
  16. package/dist/collections/linked-list/LinkedList.min.js +1 -1
  17. package/dist/collections/linked-list/Linker.d.ts +44 -44
  18. package/dist/collections/linked-list/Linker.js +87 -87
  19. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +136 -135
  20. package/dist/collections/linked-tree-list/LinkedTreeList.js +261 -256
  21. package/dist/collections/linked-tree-list/LinkedTreeList.min.js +1 -1
  22. package/dist/collections/linked-tree-list/TreeLinker.d.ts +62 -62
  23. package/dist/collections/linked-tree-list/TreeLinker.js +85 -85
  24. package/dist/collections/queue/Queue.d.ts +64 -60
  25. package/dist/collections/queue/Queue.js +137 -125
  26. package/dist/collections/queue/Queue.min.js +1 -1
  27. package/dist/collections/queue/Queueable.d.ts +78 -78
  28. package/dist/collections/queue/Queueable.js +148 -146
  29. package/dist/collections/queue/Queueable.min.js +1 -1
  30. package/dist/collections/stack/Stack.d.ts +64 -60
  31. package/dist/collections/stack/Stack.js +113 -103
  32. package/dist/collections/stack/Stack.min.js +1 -1
  33. package/dist/collections/stack/Stackable.d.ts +57 -57
  34. package/dist/collections/stack/Stackable.js +90 -90
  35. package/dist/main.d.ts +40 -40
  36. package/dist/main.js +51 -51
  37. package/dist/recipes/ArrayIterator.d.ts +11 -11
  38. package/dist/recipes/ArrayIterator.js +30 -30
  39. package/dist/recipes/DoubleLinkerIterator.d.ts +10 -10
  40. package/dist/recipes/DoubleLinkerIterator.js +24 -24
  41. package/dist/recipes/IsArrayable.d.ts +105 -105
  42. package/dist/recipes/IsArrayable.js +5 -5
  43. package/dist/recipes/IsDoubleLinker.d.ts +14 -14
  44. package/dist/recipes/IsDoubleLinker.js +5 -5
  45. package/dist/recipes/IsElement.d.ts +14 -14
  46. package/dist/recipes/IsElement.js +5 -5
  47. package/dist/recipes/IsLinker.d.ts +10 -10
  48. package/dist/recipes/IsLinker.js +5 -5
  49. package/dist/recipes/IsTree.d.ts +11 -11
  50. package/dist/recipes/IsTree.js +5 -5
  51. package/dist/recipes/IsTreeNode.d.ts +29 -29
  52. package/dist/recipes/IsTreeNode.js +5 -5
  53. package/dist/recipes/LinkerIterator.d.ts +10 -10
  54. package/dist/recipes/LinkerIterator.js +24 -24
  55. package/dist/recipes/Runnable.d.ts +54 -54
  56. package/dist/recipes/Runnable.js +69 -69
  57. package/dist/recipes/TreeLinkerIterator.d.ts +10 -10
  58. package/dist/recipes/TreeLinkerIterator.js +26 -26
  59. package/dist/recipes/recipes.d.ts +16 -16
  60. package/dist/recipes/recipes.js +24 -24
  61. package/dist/services/parseTree.d.ts +10 -10
  62. package/dist/services/parseTree.js +25 -25
  63. package/dist/services/parseTreeNext.d.ts +15 -15
  64. package/dist/services/parseTreeNext.js +47 -47
  65. package/dist/services/services.d.ts +14 -14
  66. package/dist/services/services.js +24 -24
  67. package/package.json +3 -2
package/README.md CHANGED
@@ -1,1491 +1,1495 @@
1
- # Collect your stuff (and go)
1
+ # Collect your stuff (and go)!
2
2
 
3
3
  Data allocation and manipulation.
4
4
 
5
- ## Modules
6
-
7
- <dl>
8
- <dt><a href="#module_collect-your-stuff">collect-your-stuff</a></dt>
9
- <dd><p>All of the collections available.</p>
10
- </dd>
11
- </dl>
12
-
13
- ## Classes
14
-
15
- <dl>
16
- <dt><a href="#TreeLinkerIterator">TreeLinkerIterator</a></dt>
17
- <dd><p>Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.</p>
18
- </dd>
19
- <dt><a href="#Runnable">Runnable</a></dt>
20
- <dd><p>Identify a class that can be run.</p>
21
- </dd>
22
- <dt><a href="#LinkerIterator">LinkerIterator</a></dt>
23
- <dd><p>Class LinkerIterator returns the next value when using linkers of linked type lists.</p>
24
- </dd>
25
- <dt><a href="#DoubleLinkerIterator">DoubleLinkerIterator</a></dt>
26
- <dd><p>Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.</p>
27
- </dd>
28
- <dt><a href="#ArrayIterator">ArrayIterator</a></dt>
29
- <dd><p>Class ArrayIterator returns the next value when using elements of array type list.</p>
30
- </dd>
31
- <dt><a href="#Stackable">Stackable</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
32
- <dd><p>Stackable represents a runnable entry in stack.</p>
33
- </dd>
34
- <dt><a href="#Stack">Stack</a></dt>
35
- <dd><p>Store a collection of items which can only be inserted and removed from the top.</p>
36
- </dd>
37
- <dt><a href="#Queueable">Queueable</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
38
- <dd><p>Queueable represents a runnable entry in a queue.</p>
39
- </dd>
40
- <dt><a href="#Queue">Queue</a></dt>
41
- <dd><p>Maintain a series of queued items.</p>
42
- </dd>
43
- <dt><a href="#TreeLinker">TreeLinker</a> ⇐ <code><a href="#DoubleLinker">DoubleLinker</a></code></dt>
44
- <dd><p>TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.</p>
45
- </dd>
46
- <dt><a href="#LinkedTreeList">LinkedTreeList</a> ⇐ <code><a href="#DoublyLinkedList">DoublyLinkedList</a></code></dt>
47
- <dd><p>LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.</p>
48
- </dd>
49
- <dt><a href="#Linker">Linker</a> ⇐ <code><a href="#ArrayElement">ArrayElement</a></code></dt>
50
- <dd><p>Linker represents a node in a LinkedList.</p>
51
- </dd>
52
- <dt><a href="#LinkedList">LinkedList</a> ⇐ <code><a href="#Arrayable">Arrayable</a></code></dt>
53
- <dd><p>LinkedList represents a collection stored as a LinkedList with next references.</p>
54
- </dd>
55
- <dt><a href="#DoublyLinkedList">DoublyLinkedList</a> ⇐ <code><a href="#LinkedList">LinkedList</a></code></dt>
56
- <dd><p>DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.</p>
57
- </dd>
58
- <dt><a href="#DoubleLinker">DoubleLinker</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
59
- <dd><p>DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.</p>
60
- </dd>
61
- <dt><a href="#Arrayable">Arrayable</a></dt>
62
- <dd><p>Arrayable represents a collection stored as an array.</p>
63
- </dd>
64
- <dt><a href="#ArrayElement">ArrayElement</a></dt>
65
- <dd><p>Element represents a node in an Arrayable.</p>
66
- </dd>
67
- </dl>
68
-
69
- ## Constants
70
-
71
- <dl>
72
- <dt><a href="#services">services</a></dt>
73
- <dd><p>List helpful functions when dealing with collections.</p>
74
- </dd>
75
- <dt><a href="#recipes">recipes</a></dt>
76
- <dd><p>List of class declarations that can be used to specify attributes for a style of object / class.</p>
77
- </dd>
78
- </dl>
79
-
80
- ## Functions
81
-
82
- <dl>
83
- <dt><a href="#parseTreeNext">parseTreeNext(treeNode)</a> ⇒ <code>IsTreeNode</code> | <code>null</code></dt>
84
- <dd><p>Be able to parse over every node in a tree.</p>
85
- <ol>
86
- <li>Start at root (get root parent)</li>
87
- <li>Get first child (repeat until no children)</li>
88
- <li>Check next child</li>
89
- <li>Repeat 2</li>
90
- <li>Repeat 3</li>
91
- <li>If no next child, return to parent and repeat 3</li>
92
- <li>Stop at root (next is null and parent is null</li>
93
- </ol>
94
- </dd>
95
- <dt><a href="#parseTree">parseTree(tree, callback)</a> ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code></dt>
96
- <dd><p>Loop over all the nodes in a tree starting from left and apply a callback for each</p>
97
- </dd>
98
- </dl>
99
-
100
- <a name="module_collect-your-stuff"></a>
101
-
102
- ## collect-your-stuff
103
- All of the collections available.
104
-
105
- **Version**: 1.0.0
106
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
107
- <a name="module_collect-your-stuff..collectYourStuff"></a>
108
-
109
- ### collect-your-stuff~collectYourStuff
110
- All methods exported from this module are encapsulated within collect-your-stuff.
111
-
112
- **Kind**: inner constant of [<code>collect-your-stuff</code>](#module_collect-your-stuff)
113
- <a name="TreeLinkerIterator"></a>
114
-
115
- ## TreeLinkerIterator
116
- Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.
117
-
118
- **Kind**: global class
119
- <a name="Runnable"></a>
120
-
121
- ## Runnable
122
- Identify a class that can be run.
123
-
124
- **Kind**: global class
125
-
126
- * [Runnable](#Runnable)
127
- * [new Runnable(data)](#new_Runnable_new)
128
- * _instance_
129
- * [.task](#Runnable+task) ⇒ <code>function</code>
130
- * [.run()](#Runnable+run) ⇒ <code>\*</code>
131
- * _static_
132
- * [.isRunnable(thing)](#Runnable.isRunnable) ⇒ <code>boolean</code>
133
-
134
- <a name="new_Runnable_new"></a>
135
-
136
- ### new Runnable(data)
137
- Instantiate a Runnable class.
138
-
139
-
140
- | Param | Type |
141
- | --- | --- |
142
- | data | <code>\*</code> |
143
-
144
- <a name="Runnable+task"></a>
145
-
146
- ### runnable.task ⇒ <code>function</code>
147
- Retrieve the data which should be formed as a task.
148
-
149
- **Kind**: instance property of [<code>Runnable</code>](#Runnable)
150
- <a name="Runnable+run"></a>
151
-
152
- ### runnable.run() ⇒ <code>\*</code>
153
- Run the runnable task.
154
-
155
- **Kind**: instance method of [<code>Runnable</code>](#Runnable)
156
- <a name="Runnable.isRunnable"></a>
157
-
158
- ### Runnable.isRunnable(thing) ⇒ <code>boolean</code>
159
- Check if a given thing is Runnable
160
-
161
- **Kind**: static method of [<code>Runnable</code>](#Runnable)
162
-
163
- | Param | Type |
164
- | --- | --- |
165
- | thing | <code>\*</code> |
166
-
167
- <a name="LinkerIterator"></a>
168
-
169
- ## LinkerIterator
170
- Class LinkerIterator returns the next value when using linkers of linked type lists.
171
-
172
- **Kind**: global class
173
- <a name="DoubleLinkerIterator"></a>
174
-
175
- ## DoubleLinkerIterator
176
- Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
177
-
178
- **Kind**: global class
179
- <a name="ArrayIterator"></a>
180
-
181
- ## ArrayIterator
182
- Class ArrayIterator returns the next value when using elements of array type list.
183
-
184
- **Kind**: global class
185
- <a name="Stackable"></a>
186
-
187
- ## Stackable ⇐ [<code>Linker</code>](#Linker)
188
- Stackable represents a runnable entry in stack.
189
-
190
- **Kind**: global class
191
- **Extends**: [<code>Linker</code>](#Linker)
192
-
193
- * [Stackable](#Stackable) ⇐ [<code>Linker</code>](#Linker)
194
- * [new Stackable([stackData])](#new_Stackable_new)
195
- * _instance_
196
- * [.task](#Stackable+task) ⇒ <code>\*</code>
197
- * [.run()](#Stackable+run) ⇒ <code>\*</code>
198
- * _static_
199
- * [.make(stackable, [classType])](#Stackable.make) ⇒ [<code>Stackable</code>](#Stackable)
200
- * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
201
-
202
- <a name="new_Stackable_new"></a>
203
-
204
- ### new Stackable([stackData])
205
- Create a stackable item that can be used in a stack.
206
-
207
-
208
- | Param | Type | Default | Description |
209
- | --- | --- | --- | --- |
210
- | [stackData] | <code>Object</code> | <code>{}</code> | |
211
- | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
212
- | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
213
- | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
214
-
215
- <a name="Stackable+task"></a>
216
-
217
- ### stackable.task ⇒ <code>\*</code>
218
- Retrieve the data which should be formed as a task.
219
-
220
- **Kind**: instance property of [<code>Stackable</code>](#Stackable)
221
- <a name="Stackable+run"></a>
222
-
223
- ### stackable.run() ⇒ <code>\*</code>
224
- Run the stacked task.
225
-
226
- **Kind**: instance method of [<code>Stackable</code>](#Stackable)
227
- <a name="Stackable.make"></a>
228
-
229
- ### Stackable.make(stackable, [classType]) ⇒ [<code>Stackable</code>](#Stackable)
230
- Make a new Stackable from the data given if it is not already a valid Stackable.
231
-
232
- **Kind**: static method of [<code>Stackable</code>](#Stackable)
233
-
234
- | Param | Type | Default | Description |
235
- | --- | --- | --- | --- |
236
- | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | | Return a valid Stackable instance from given data, or even an already valid one. |
237
- | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
238
-
239
- <a name="Stackable.fromArray"></a>
240
-
241
- ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
242
- Convert an array into Stackable instances, return the head and tail Stackables.
243
-
244
- **Kind**: static method of [<code>Stackable</code>](#Stackable)
245
-
246
- | Param | Type | Default | Description |
247
- | --- | --- | --- | --- |
248
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
249
- | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
250
-
251
- <a name="Stack"></a>
252
-
253
- ## Stack
254
- Store a collection of items which can only be inserted and removed from the top.
255
-
256
- **Kind**: global class
257
-
258
- * [Stack](#Stack)
259
- * [new Stack(stackedList)](#new_Stack_new)
260
- * _instance_
261
- * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
262
- * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
263
- * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
264
- * [.push(stackable)](#Stack+push)
265
- * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
266
- * [.size()](#Stack+size) ⇒ <code>number</code>
267
- * _static_
268
- * [.fromArray(values, stackableClass, listClass)](#Stack.fromArray) ⇒ [<code>Stack</code>](#Stack)
269
-
270
- <a name="new_Stack_new"></a>
271
-
272
- ### new Stack(stackedList)
273
- Instantiate the state with the starter stacked list.
274
-
275
-
276
- | Param | Type |
277
- | --- | --- |
278
- | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) |
279
-
280
- <a name="Stack+empty"></a>
281
-
282
- ### stack.empty() ⇒ <code>boolean</code>
283
- Return true if the stack is empty (there are no tasks in the stacked list)
284
-
285
- **Kind**: instance method of [<code>Stack</code>](#Stack)
286
- <a name="Stack+top"></a>
287
-
288
- ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
289
- Take a look at the next stacked task
290
-
291
- **Kind**: instance method of [<code>Stack</code>](#Stack)
292
- <a name="Stack+pop"></a>
293
-
294
- ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
295
- Remove the next stacked task and return it.
296
-
297
- **Kind**: instance method of [<code>Stack</code>](#Stack)
298
- <a name="Stack+push"></a>
299
-
300
- ### stack.push(stackable)
301
- Push a stackable task to the top of the stack.
302
-
303
- **Kind**: instance method of [<code>Stack</code>](#Stack)
304
-
305
- | Param | Type | Description |
306
- | --- | --- | --- |
307
- | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
308
-
309
- <a name="Stack+remove"></a>
310
-
311
- ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
312
- Remove the next stacked task and return it.
313
-
314
- **Kind**: instance method of [<code>Stack</code>](#Stack)
315
- <a name="Stack+size"></a>
316
-
317
- ### stack.size() ⇒ <code>number</code>
318
- Get the size of the current stack.
319
-
320
- **Kind**: instance method of [<code>Stack</code>](#Stack)
321
- <a name="Stack.fromArray"></a>
322
-
323
- ### Stack.fromArray(values, stackableClass, listClass) ⇒ [<code>Stack</code>](#Stack)
324
- Convert an array to a Stack.
325
-
326
- **Kind**: static method of [<code>Stack</code>](#Stack)
327
-
328
- | Param | Type | Description |
329
- | --- | --- | --- |
330
- | values | <code>Array</code> | An array of values which will be converted to stackables in this queue |
331
- | stackableClass | [<code>Stackable</code>](#Stackable) | The class to use for each stackable |
332
- | listClass | [<code>Stack</code>](#Stack) \| <code>Iterable</code> | The class to use to manage the stackables |
333
-
334
- <a name="Queueable"></a>
335
-
336
- ## Queueable ⇐ [<code>Linker</code>](#Linker)
337
- Queueable represents a runnable entry in a queue.
338
-
339
- **Kind**: global class
340
- **Extends**: [<code>Linker</code>](#Linker)
341
-
342
- * [Queueable](#Queueable) ⇐ [<code>Linker</code>](#Linker)
343
- * [new Queueable([queueableData])](#new_Queueable_new)
344
- * _instance_
345
- * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
346
- * [.task](#Queueable+task) ⇒ <code>\*</code>
347
- * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
348
- * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
349
- * _static_
350
- * [.make(queueable, [classType])](#Queueable.make) ⇒ [<code>Queueable</code>](#Queueable)
351
- * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
352
-
353
- <a name="new_Queueable_new"></a>
354
-
355
- ### new Queueable([queueableData])
356
- Create a queueable item that can be used in a queue.
357
-
358
-
359
- | Param | Type | Default | Description |
360
- | --- | --- | --- | --- |
361
- | [queueableData] | <code>Object</code> | <code>{}</code> | |
362
- | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
363
- | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
364
- | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
365
-
366
- <a name="Queueable+isReady"></a>
367
-
368
- ### queueable.isReady ⇒ <code>boolean</code>
369
- Check ready state.
370
-
371
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
372
- <a name="Queueable+task"></a>
373
-
374
- ### queueable.task ⇒ <code>\*</code>
375
- Retrieve the data which should be formed as a task.
376
-
377
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
378
- <a name="Queueable+markCompleted"></a>
379
-
380
- ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
381
- Set this queueable as completed.
382
-
383
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
384
-
385
- | Param | Type | Default | Description |
386
- | --- | --- | --- | --- |
387
- | completeResponse | <code>Object</code> | | |
388
- | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
389
- | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
390
- | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
391
-
392
- <a name="Queueable+run"></a>
393
-
394
- ### queueable.run() ⇒ <code>completeResponse</code>
395
- Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
396
-
397
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
398
- <a name="Queueable.make"></a>
399
-
400
- ### Queueable.make(queueable, [classType]) ⇒ [<code>Queueable</code>](#Queueable)
401
- Make a new Queueable from the data given if it is not already a valid Queueable.
402
-
403
- **Kind**: static method of [<code>Queueable</code>](#Queueable)
404
-
405
- | Param | Type | Default | Description |
406
- | --- | --- | --- | --- |
407
- | queueable | [<code>Queueable</code>](#Queueable) \| <code>\*</code> | | Return a valid Queueable instance from given data, or even an already valid one. |
408
- | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
409
-
410
- <a name="Queueable.fromArray"></a>
411
-
412
- ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
413
- Convert an array into Queueable instances, return the head and tail Queueables.
414
-
415
- **Kind**: static method of [<code>Queueable</code>](#Queueable)
416
-
417
- | Param | Type | Default | Description |
418
- | --- | --- | --- | --- |
419
- | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
420
- | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
421
-
422
- <a name="Queue"></a>
423
-
424
- ## Queue
425
- Maintain a series of queued items.
426
-
427
- **Kind**: global class
428
-
429
- * [Queue](#Queue)
430
- * [new Queue(queuedList)](#new_Queue_new)
431
- * _instance_
432
- * [.dequeue()](#Queue+dequeue) ⇒ <code>completeResponse</code> \| <code>\*</code>
433
- * [.empty()](#Queue+empty) ⇒ <code>boolean</code>
434
- * [.enqueue(queueable)](#Queue+enqueue)
435
- * [.peek()](#Queue+peek) ⇒ [<code>Queueable</code>](#Queueable)
436
- * [.remove()](#Queue+remove) ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
437
- * [.size()](#Queue+size) ⇒ <code>number</code>
438
- * _static_
439
- * [.fromArray(values, queueableClass, listClass)](#Queue.fromArray) ⇒ [<code>Queue</code>](#Queue)
440
-
441
- <a name="new_Queue_new"></a>
442
-
443
- ### new Queue(queuedList)
444
- Instantiate the queue with the given queue list.
445
-
446
-
447
- | Param | Type | Description |
448
- | --- | --- | --- |
449
- | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | Give the list of queueables to start in this queue. |
450
-
451
- <a name="Queue+dequeue"></a>
452
-
453
- ### queue.dequeue() <code>completeResponse</code> \| <code>\*</code>
454
- Take a queued task from the front of the queue and run it if ready.
455
-
456
- **Kind**: instance method of [<code>Queue</code>](#Queue)
457
- <a name="Queue+empty"></a>
458
-
459
- ### queue.empty() ⇒ <code>boolean</code>
460
- Return true if the queue is empty (there are no tasks in the queue list)
461
-
462
- **Kind**: instance method of [<code>Queue</code>](#Queue)
463
- <a name="Queue+enqueue"></a>
464
-
465
- ### queue.enqueue(queueable)
466
- Add a queued task to the end of the queue
467
-
468
- **Kind**: instance method of [<code>Queue</code>](#Queue)
469
-
470
- | Param | Type | Description |
471
- | --- | --- | --- |
472
- | queueable | [<code>Queueable</code>](#Queueable) | Add a new queueable to the end of the queue |
473
-
474
- <a name="Queue+peek"></a>
475
-
476
- ### queue.peek() [<code>Queueable</code>](#Queueable)
477
- Take a look at the next queued task
478
-
479
- **Kind**: instance method of [<code>Queue</code>](#Queue)
480
- <a name="Queue+remove"></a>
481
-
482
- ### queue.remove() ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
483
- Remove the next queued item and return it.
484
-
485
- **Kind**: instance method of [<code>Queue</code>](#Queue)
486
- <a name="Queue+size"></a>
487
-
488
- ### queue.size() ⇒ <code>number</code>
489
- Get the length of the current queue.
490
-
491
- **Kind**: instance method of [<code>Queue</code>](#Queue)
492
- <a name="Queue.fromArray"></a>
493
-
494
- ### Queue.fromArray(values, queueableClass, listClass) ⇒ [<code>Queue</code>](#Queue)
495
- Convert an array to a Queue.
496
-
497
- **Kind**: static method of [<code>Queue</code>](#Queue)
498
-
499
- | Param | Type | Description |
500
- | --- | --- | --- |
501
- | values | <code>Array</code> | An array of values which will be converted to queueables in this queue |
502
- | queueableClass | [<code>Queueable</code>](#Queueable) | The class to use for each queueable |
503
- | listClass | [<code>Queue</code>](#Queue) \| <code>Iterable</code> | The class to use to manage the queueables |
504
-
505
- <a name="TreeLinker"></a>
506
-
507
- ## TreeLinker [<code>DoubleLinker</code>](#DoubleLinker)
508
- TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.
509
-
510
- **Kind**: global class
511
- **Extends**: [<code>DoubleLinker</code>](#DoubleLinker)
512
-
513
- * [TreeLinker](#TreeLinker) ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
514
- * [new TreeLinker([settings])](#new_TreeLinker_new)
515
- * _instance_
516
- * [.childrenFromArray(children, classType)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
517
- * _static_
518
- * [.make(linker, [classType])](#TreeLinker.make) ⇒ [<code>TreeLinker</code>](#TreeLinker)
519
- * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
520
-
521
- <a name="new_TreeLinker_new"></a>
522
-
523
- ### new TreeLinker([settings])
524
- Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
525
-
526
-
527
- | Param | Type | Default | Description |
528
- | --- | --- | --- | --- |
529
- | [settings] | <code>Object</code> | <code>{}</code> | |
530
- | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
531
- | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
532
- | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
533
- | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
534
- | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
535
-
536
- <a name="TreeLinker+childrenFromArray"></a>
537
-
538
- ### treeLinker.childrenFromArray(children, classType) [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
539
- Create the children for this tree from an array.
540
-
541
- **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
542
-
543
- | Param | Type | Description |
544
- | --- | --- | --- |
545
- | children | <code>Array</code> \| <code>null</code> | Provide an array of data / linker references to be children of this tree node. |
546
- | classType | <code>IsTree</code> | Provide the type of IsElement to use. |
547
-
548
- <a name="TreeLinker.make"></a>
549
-
550
- ### TreeLinker.make(linker, [classType]) [<code>TreeLinker</code>](#TreeLinker)
551
- Make a new DoubleLinker from the data given if it is not already a valid Linker.
552
-
553
- **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
554
-
555
- | Param | Type | Default | Description |
556
- | --- | --- | --- | --- |
557
- | linker | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | | Return a valid TreeLinker instance from given data, or even an already valid one. |
558
- | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
559
-
560
- <a name="TreeLinker.fromArray"></a>
561
-
562
- ### TreeLinker.fromArray([values], [classType]) <code>Object</code>
563
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
564
-
565
- **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
566
-
567
- | Param | Type | Default | Description |
568
- | --- | --- | --- | --- |
569
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
570
- | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
571
-
572
- <a name="LinkedTreeList"></a>
573
-
574
- ## LinkedTreeList [<code>DoublyLinkedList</code>](#DoublyLinkedList)
575
- LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.
576
-
577
- **Kind**: global class
578
- **Extends**: [<code>DoublyLinkedList</code>](#DoublyLinkedList)
579
-
580
- * [LinkedTreeList](#LinkedTreeList) ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
581
- * [new LinkedTreeList()](#new_LinkedTreeList_new)
582
- * _instance_
583
- * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
584
- * [.first](#LinkedTreeList+first) [<code>TreeLinker</code>](#TreeLinker)
585
- * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
586
- * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
587
- * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
588
- * [.parent](#LinkedTreeList+parent)
589
- * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
590
- * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
591
- * [.setChildren(item, children)](#LinkedTreeList+setChildren)
592
- * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
593
- * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
594
- * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
595
- * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
596
- * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
597
- * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
598
- * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
599
- * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
600
- * _static_
601
- * [.fromArray([values], [linkerClass], [classType])](#LinkedTreeList.fromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
602
-
603
- <a name="new_LinkedTreeList_new"></a>
604
-
605
- ### new LinkedTreeList()
606
- Create the new LinkedTreeList instance, configure the list class.
607
-
608
- <a name="LinkedTreeList+list"></a>
609
-
610
- ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
611
- Retrieve a copy of the innerList used.
612
-
613
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
614
- **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
615
- <a name="LinkedTreeList+first"></a>
616
-
617
- ### linkedTreeList.first [<code>TreeLinker</code>](#TreeLinker)
618
- Retrieve the first TreeLinker in the list.
619
-
620
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
621
- **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
622
- <a name="LinkedTreeList+last"></a>
623
-
624
- ### linkedTreeList.last [<code>TreeLinker</code>](#TreeLinker)
625
- Retrieve the last TreeLinker in the list.
626
-
627
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
628
- **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
629
- <a name="LinkedTreeList+length"></a>
630
-
631
- ### linkedTreeList.length <code>number</code>
632
- Return the length of the list.
633
-
634
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
635
- **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
636
- <a name="LinkedTreeList+parent"></a>
637
-
638
- ### linkedTreeList.parent [<code>TreeLinker</code>](#TreeLinker)
639
- Get the parent of this tree list.
640
-
641
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
642
- <a name="LinkedTreeList+parent"></a>
643
-
644
- ### linkedTreeList.parent
645
- Set the parent of this tree list
646
-
647
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
648
-
649
- | Param | Type | Description |
650
- | --- | --- | --- |
651
- | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
652
-
653
- <a name="LinkedTreeList+rootParent"></a>
654
-
655
- ### linkedTreeList.rootParent [<code>TreeLinker</code>](#TreeLinker)
656
- Return the root parent of the entire tree.
657
-
658
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
659
- <a name="LinkedTreeList+initialize"></a>
660
-
661
- ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
662
- Initialize the inner list, should only run once.
663
-
664
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
665
- **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
666
-
667
- | Param | Type | Description |
668
- | --- | --- | --- |
669
- | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
670
-
671
- <a name="LinkedTreeList+setChildren"></a>
672
-
673
- ### linkedTreeList.setChildren(item, children)
674
- Set the children on a parent item.
675
-
676
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
677
-
678
- | Param | Type | Description |
679
- | --- | --- | --- |
680
- | item | [<code>TreeLinker</code>](#TreeLinker) | The TreeLinker node that will be the parent of the children |
681
- | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | The LinkedTreeList which has the child nodes to use |
682
-
683
- <a name="LinkedTreeList+insertAfter"></a>
684
-
685
- ### linkedTreeList.insertAfter(node, newNode) [<code>LinkedTreeList</code>](#LinkedTreeList)
686
- Insert a new node (or data) after a node.
687
-
688
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
689
- **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
690
-
691
- | Param | Type | Description |
692
- | --- | --- | --- |
693
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
694
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
695
-
696
- <a name="LinkedTreeList+insertBefore"></a>
697
-
698
- ### linkedTreeList.insertBefore(node, newNode) [<code>LinkedTreeList</code>](#LinkedTreeList)
699
- Insert a new node (or data) before a node.
700
-
701
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
702
- **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
703
-
704
- | Param | Type | Description |
705
- | --- | --- | --- |
706
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
707
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
708
-
709
- <a name="LinkedTreeList+append"></a>
710
-
711
- ### linkedTreeList.append(node, after) [<code>TreeLinker</code>](#TreeLinker)
712
- Add a node (or data) after the given (or last) node in the list.
713
-
714
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
715
- **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
716
-
717
- | Param | Type | Description |
718
- | --- | --- | --- |
719
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
720
- | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
721
-
722
- <a name="LinkedTreeList+prepend"></a>
723
-
724
- ### linkedTreeList.prepend(node, before) [<code>TreeLinker</code>](#TreeLinker)
725
- Add a node (or data) before the given (or first) node in the list.
726
-
727
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
728
- **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
729
-
730
- | Param | Type | Description |
731
- | --- | --- | --- |
732
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
733
- | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
734
-
735
- <a name="LinkedTreeList+remove"></a>
736
-
737
- ### linkedTreeList.remove(node) [<code>TreeLinker</code>](#TreeLinker)
738
- Remove a linker from this linked list.
739
-
740
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
741
- **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
742
-
743
- | Param | Type | Description |
744
- | --- | --- | --- |
745
- | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
746
-
747
- <a name="LinkedTreeList+reset"></a>
748
-
749
- ### linkedTreeList.reset() [<code>TreeLinker</code>](#TreeLinker)
750
- Refresh all references and return head reference.
751
-
752
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
753
- **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
754
- <a name="LinkedTreeList+item"></a>
755
-
756
- ### linkedTreeList.item(index) [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
757
- Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
758
-
759
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
760
- **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
761
-
762
- | Param | Type | Description |
763
- | --- | --- | --- |
764
- | index | <code>number</code> | The integer number for retrieving a node by position. |
765
-
766
- <a name="LinkedTreeList+forEach"></a>
767
-
768
- ### linkedTreeList.forEach(callback, thisArg)
769
- Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
770
-
771
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
772
- **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
773
-
774
- | Param | Type | Description |
775
- | --- | --- | --- |
776
- | callback | <code>forEachCallback</code> | The function to call for-each tree node |
777
- | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
778
-
779
- <a name="LinkedTreeList.fromArray"></a>
780
-
781
- ### LinkedTreeList.fromArray([values], [linkerClass], [classType]) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
782
- Convert an array into a LinkedTreeList instance, return the new instance.
783
-
784
- **Kind**: static method of [<code>LinkedTreeList</code>](#LinkedTreeList)
785
-
786
- | Param | Type | Default | Description |
787
- | --- | --- | --- | --- |
788
- | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to nodes in this tree-list |
789
- | [linkerClass] | [<code>TreeLinker</code>](#TreeLinker) | <code>TreeLinker</code> | The class to use for each node |
790
- | [classType] | [<code>IsArrayable.&lt;TreeLinker&gt;</code>](#TreeLinker) | <code>LinkedTreeList</code> | Provide the type of IsArrayable to use. |
791
-
792
- <a name="Linker"></a>
793
-
794
- ## Linker [<code>ArrayElement</code>](#ArrayElement)
795
- Linker represents a node in a LinkedList.
796
-
797
- **Kind**: global class
798
- **Extends**: [<code>ArrayElement</code>](#ArrayElement)
799
-
800
- * [Linker](#Linker) ⇐ [<code>ArrayElement</code>](#ArrayElement)
801
- * [new Linker([nodeData])](#new_Linker_new)
802
- * [.make(linker, [classType])](#Linker.make) ⇒ [<code>Linker</code>](#Linker)
803
- * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
804
-
805
- <a name="new_Linker_new"></a>
806
-
807
- ### new Linker([nodeData])
808
- Create the new Linker instance, provide the data and optionally give the next Linker.
809
-
810
-
811
- | Param | Type | Default | Description |
812
- | --- | --- | --- | --- |
813
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
814
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
815
- | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
816
-
817
- <a name="Linker.make"></a>
818
-
819
- ### Linker.make(linker, [classType]) [<code>Linker</code>](#Linker)
820
- Make a new Linker from the data given if it is not already a valid Linker.
821
-
822
- **Kind**: static method of [<code>Linker</code>](#Linker)
823
-
824
- | Param | Type | Default | Description |
825
- | --- | --- | --- | --- |
826
- | linker | [<code>Linker</code>](#Linker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
827
- | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
828
-
829
- <a name="Linker.fromArray"></a>
830
-
831
- ### Linker.fromArray([values], [classType]) <code>Object</code>
832
- Convert an array into Linker instances, return the head and tail Linkers.
833
-
834
- **Kind**: static method of [<code>Linker</code>](#Linker)
835
-
836
- | Param | Type | Default | Description |
837
- | --- | --- | --- | --- |
838
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
839
- | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
840
-
841
- <a name="LinkedList"></a>
842
-
843
- ## LinkedList [<code>Arrayable</code>](#Arrayable)
844
- LinkedList represents a collection stored as a LinkedList with next references.
845
-
846
- **Kind**: global class
847
- **Extends**: [<code>Arrayable</code>](#Arrayable)
848
-
849
- * [LinkedList](#LinkedList) ⇐ [<code>Arrayable</code>](#Arrayable)
850
- * [new LinkedList()](#new_LinkedList_new)
851
- * _instance_
852
- * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
853
- * [.first](#LinkedList+first) [<code>Linker</code>](#Linker)
854
- * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
855
- * [.length](#LinkedList+length) ⇒ <code>number</code>
856
- * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
857
- * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
858
- * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
859
- * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
860
- * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
861
- * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
862
- * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
863
- * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
864
- * _static_
865
- * [.fromArray(values, linkerClass, [classType])](#LinkedList.fromArray) ⇒ [<code>LinkedList</code>](#LinkedList)
866
-
867
- <a name="new_LinkedList_new"></a>
868
-
869
- ### new LinkedList()
870
- Create the new LinkedList instance.
871
-
872
- <a name="LinkedList+list"></a>
873
-
874
- ### linkedList.list [<code>Linker</code>](#Linker)
875
- Retrieve a copy of the innerList used.
876
-
877
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
878
- **Overrides**: [<code>list</code>](#Arrayable+list)
879
- <a name="LinkedList+first"></a>
880
-
881
- ### linkedList.first [<code>Linker</code>](#Linker)
882
- Retrieve the first Linker in the list.
883
-
884
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
885
- **Overrides**: [<code>first</code>](#Arrayable+first)
886
- <a name="LinkedList+last"></a>
887
-
888
- ### linkedList.last [<code>Linker</code>](#Linker)
889
- Retrieve the last Linker in the list.
890
-
891
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
892
- **Overrides**: [<code>last</code>](#Arrayable+last)
893
- <a name="LinkedList+length"></a>
894
-
895
- ### linkedList.length <code>number</code>
896
- Return the length of the list.
897
-
898
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
899
- **Overrides**: [<code>length</code>](#Arrayable+length)
900
- <a name="LinkedList+initialize"></a>
901
-
902
- ### linkedList.initialize(initialList) [<code>LinkedList</code>](#LinkedList)
903
- Initialize the inner list, should only run once.
904
-
905
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
906
- **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
907
-
908
- | Param | Type | Description |
909
- | --- | --- | --- |
910
- | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
911
-
912
- <a name="LinkedList+insertAfter"></a>
913
-
914
- ### linkedList.insertAfter(node, newNode) [<code>LinkedList</code>](#LinkedList)
915
- Insert a new node (or data) after a node.
916
-
917
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
918
- **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
919
-
920
- | Param | Type | Description |
921
- | --- | --- | --- |
922
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
923
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
924
-
925
- <a name="LinkedList+insertBefore"></a>
926
-
927
- ### linkedList.insertBefore(node, newNode) [<code>LinkedList</code>](#LinkedList)
928
- Insert a new node (or data) before a node.
929
-
930
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
931
- **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
932
-
933
- | Param | Type | Description |
934
- | --- | --- | --- |
935
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
936
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
937
-
938
- <a name="LinkedList+append"></a>
939
-
940
- ### linkedList.append(node, after) [<code>Linker</code>](#Linker)
941
- Add a node (or data) after the given (or last) node in the list.
942
-
943
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
944
- **Overrides**: [<code>append</code>](#Arrayable+append)
945
-
946
- | Param | Type | Description |
947
- | --- | --- | --- |
948
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
949
- | after | [<code>Linker</code>](#Linker) | The existing last node |
950
-
951
- <a name="LinkedList+prepend"></a>
952
-
953
- ### linkedList.prepend(node, before) [<code>Linker</code>](#Linker)
954
- Add a node (or data) before the given (or first) node in the list.
955
-
956
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
957
- **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
958
-
959
- | Param | Type | Description |
960
- | --- | --- | --- |
961
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
962
- | before | [<code>Linker</code>](#Linker) | The existing first node |
963
-
964
- <a name="LinkedList+remove"></a>
965
-
966
- ### linkedList.remove(node) [<code>Linker</code>](#Linker)
967
- Remove a linker from this linked list.
968
-
969
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
970
- **Overrides**: [<code>remove</code>](#Arrayable+remove)
971
-
972
- | Param | Type | Description |
973
- | --- | --- | --- |
974
- | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
975
-
976
- <a name="LinkedList+item"></a>
977
-
978
- ### linkedList.item(index) [<code>Linker</code>](#Linker) \| <code>null</code>
979
- Retrieve a Linker item from this list by numeric index, otherwise return null.
980
-
981
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
982
- **Overrides**: [<code>item</code>](#Arrayable+item)
983
-
984
- | Param | Type | Description |
985
- | --- | --- | --- |
986
- | index | <code>number</code> | The integer number for retrieving a node by position. |
987
-
988
- <a name="LinkedList+forEach"></a>
989
-
990
- ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
991
- Be able to run forEach on this LinkedList to iterate over the linkers.
992
-
993
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
994
- **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
995
-
996
- | Param | Type | Description |
997
- | --- | --- | --- |
998
- | callback | <code>forEachCallback</code> | The function to call for-each linker |
999
- | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
1000
-
1001
- <a name="LinkedList.fromArray"></a>
1002
-
1003
- ### LinkedList.fromArray(values, linkerClass, [classType]) ⇒ [<code>LinkedList</code>](#LinkedList)
1004
- Convert an array to a LinkedList.
1005
-
1006
- **Kind**: static method of [<code>LinkedList</code>](#LinkedList)
1007
-
1008
- | Param | Type | Default | Description |
1009
- | --- | --- | --- | --- |
1010
- | values | <code>Array</code> | | An array of values which will be converted to linkers in this linked-list |
1011
- | linkerClass | <code>IsLinker</code> | | The class to use for each linker |
1012
- | [classType] | [<code>IsArrayable.&lt;Linker&gt;</code>](#Linker) | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1013
-
1014
- <a name="DoublyLinkedList"></a>
1015
-
1016
- ## DoublyLinkedList [<code>LinkedList</code>](#LinkedList)
1017
- DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.
1018
-
1019
- **Kind**: global class
1020
- **Extends**: [<code>LinkedList</code>](#LinkedList)
1021
-
1022
- * [DoublyLinkedList](#DoublyLinkedList) ⇐ [<code>LinkedList</code>](#LinkedList)
1023
- * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
1024
- * _instance_
1025
- * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1026
- * [.first](#DoublyLinkedList+first) [<code>DoubleLinker</code>](#DoubleLinker)
1027
- * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1028
- * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
1029
- * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1030
- * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1031
- * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1032
- * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1033
- * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1034
- * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1035
- * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1036
- * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1037
- * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
1038
- * _static_
1039
- * [.fromArray([values], [linkerClass], [classType])](#DoublyLinkedList.fromArray) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1040
-
1041
- <a name="new_DoublyLinkedList_new"></a>
1042
-
1043
- ### new DoublyLinkedList()
1044
- Create the new DoublyLinkedList instance.
1045
-
1046
- <a name="DoublyLinkedList+list"></a>
1047
-
1048
- ### doublyLinkedList.list [<code>DoubleLinker</code>](#DoubleLinker)
1049
- Retrieve a copy of the innerList used.
1050
-
1051
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1052
- **Overrides**: [<code>list</code>](#LinkedList+list)
1053
- <a name="DoublyLinkedList+first"></a>
1054
-
1055
- ### doublyLinkedList.first [<code>DoubleLinker</code>](#DoubleLinker)
1056
- Retrieve the first DoubleLinker in the list.
1057
-
1058
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1059
- **Overrides**: [<code>first</code>](#LinkedList+first)
1060
- <a name="DoublyLinkedList+last"></a>
1061
-
1062
- ### doublyLinkedList.last [<code>DoubleLinker</code>](#DoubleLinker)
1063
- Retrieve the last DoubleLinker in the list.
1064
-
1065
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1066
- **Overrides**: [<code>last</code>](#LinkedList+last)
1067
- <a name="DoublyLinkedList+length"></a>
1068
-
1069
- ### doublyLinkedList.length <code>number</code>
1070
- Return the length of the list.
1071
-
1072
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1073
- **Overrides**: [<code>length</code>](#LinkedList+length)
1074
- <a name="DoublyLinkedList+initialize"></a>
1075
-
1076
- ### doublyLinkedList.initialize(initialList) [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1077
- Initialize the inner list, should only run once.
1078
-
1079
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1080
- **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
1081
-
1082
- | Param | Type | Description |
1083
- | --- | --- | --- |
1084
- | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
1085
-
1086
- <a name="DoublyLinkedList+insertAfter"></a>
1087
-
1088
- ### doublyLinkedList.insertAfter(node, newNode) [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1089
- Insert a new node (or data) after a node.
1090
-
1091
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1092
- **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
1093
-
1094
- | Param | Type | Description |
1095
- | --- | --- | --- |
1096
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1097
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
1098
-
1099
- <a name="DoublyLinkedList+insertBefore"></a>
1100
-
1101
- ### doublyLinkedList.insertBefore(node, newNode) [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1102
- Insert a new node (or data) before a node.
1103
-
1104
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1105
- **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
1106
-
1107
- | Param | Type | Description |
1108
- | --- | --- | --- |
1109
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1110
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
1111
-
1112
- <a name="DoublyLinkedList+append"></a>
1113
-
1114
- ### doublyLinkedList.append(node, after) [<code>DoubleLinker</code>](#DoubleLinker)
1115
- Add a node (or data) after the given (or last) node in the list.
1116
-
1117
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1118
- **Overrides**: [<code>append</code>](#LinkedList+append)
1119
-
1120
- | Param | Type | Description |
1121
- | --- | --- | --- |
1122
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
1123
- | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
1124
-
1125
- <a name="DoublyLinkedList+prepend"></a>
1126
-
1127
- ### doublyLinkedList.prepend(node, before) [<code>DoubleLinker</code>](#DoubleLinker)
1128
- Add a node (or data) before the given (or first) node in the list.
1129
-
1130
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1131
- **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
1132
-
1133
- | Param | Type | Description |
1134
- | --- | --- | --- |
1135
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
1136
- | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
1137
-
1138
- <a name="DoublyLinkedList+remove"></a>
1139
-
1140
- ### doublyLinkedList.remove(node) [<code>DoubleLinker</code>](#DoubleLinker)
1141
- Remove a linker from this linked list.
1142
-
1143
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1144
- **Overrides**: [<code>remove</code>](#LinkedList+remove)
1145
-
1146
- | Param | Type | Description |
1147
- | --- | --- | --- |
1148
- | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
1149
-
1150
- <a name="DoublyLinkedList+reset"></a>
1151
-
1152
- ### doublyLinkedList.reset() [<code>DoubleLinker</code>](#DoubleLinker)
1153
- Refresh all references and return head reference.
1154
-
1155
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1156
- <a name="DoublyLinkedList+item"></a>
1157
-
1158
- ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1159
- Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
1160
-
1161
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1162
- **Overrides**: [<code>item</code>](#LinkedList+item)
1163
-
1164
- | Param | Type | Description |
1165
- | --- | --- | --- |
1166
- | index | <code>number</code> | The integer number for retrieving a node by position. |
1167
-
1168
- <a name="DoublyLinkedList+forEach"></a>
1169
-
1170
- ### doublyLinkedList.forEach(callback, thisArg)
1171
- Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
1172
-
1173
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1174
- **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
1175
-
1176
- | Param | Type | Description |
1177
- | --- | --- | --- |
1178
- | callback | <code>forEachCallback</code> | The function to call for-each double linker |
1179
- | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
1180
-
1181
- <a name="DoublyLinkedList.fromArray"></a>
1182
-
1183
- ### DoublyLinkedList.fromArray([values], [linkerClass], [classType]) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1184
- Convert an array into a DoublyLinkedList instance, return the new instance.
1185
-
1186
- **Kind**: static method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1187
-
1188
- | Param | Type | Default | Description |
1189
- | --- | --- | --- | --- |
1190
- | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to linkers in this doubly-linked-list |
1191
- | [linkerClass] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | The class to use for each linker |
1192
- | [classType] | <code>IsArrayable.&lt;IsDoubleLinker&gt;</code> | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1193
-
1194
- <a name="DoubleLinker"></a>
1195
-
1196
- ## DoubleLinker [<code>Linker</code>](#Linker)
1197
- DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.
1198
-
1199
- **Kind**: global class
1200
- **Extends**: [<code>Linker</code>](#Linker)
1201
-
1202
- * [DoubleLinker](#DoubleLinker) ⇐ [<code>Linker</code>](#Linker)
1203
- * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
1204
- * [.make(linker, [classType])](#DoubleLinker.make) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1205
- * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
1206
-
1207
- <a name="new_DoubleLinker_new"></a>
1208
-
1209
- ### new DoubleLinker([nodeData])
1210
- Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
1211
-
1212
-
1213
- | Param | Type | Default | Description |
1214
- | --- | --- | --- | --- |
1215
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
1216
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1217
- | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1218
- | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
1219
-
1220
- <a name="DoubleLinker.make"></a>
1221
-
1222
- ### DoubleLinker.make(linker, [classType]) [<code>DoubleLinker</code>](#DoubleLinker)
1223
- Make a new DoubleLinker from the data given if it is not already a valid Linker.
1224
-
1225
- **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1226
-
1227
- | Param | Type | Default | Description |
1228
- | --- | --- | --- | --- |
1229
- | linker | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
1230
- | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1231
-
1232
- <a name="DoubleLinker.fromArray"></a>
1233
-
1234
- ### DoubleLinker.fromArray([values], [classType]) <code>Object</code>
1235
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1236
-
1237
- **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1238
-
1239
- | Param | Type | Default | Description |
1240
- | --- | --- | --- | --- |
1241
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1242
- | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1243
-
1244
- <a name="Arrayable"></a>
1245
-
1246
- ## Arrayable
1247
- Arrayable represents a collection stored as an array.
1248
-
1249
- **Kind**: global class
1250
-
1251
- * [Arrayable](#Arrayable)
1252
- * [new Arrayable()](#new_Arrayable_new)
1253
- * _instance_
1254
- * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1255
- * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1256
- * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1257
- * [.length](#Arrayable+length) ⇒ <code>number</code>
1258
- * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
1259
- * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
1260
- * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
1261
- * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
1262
- * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
1263
- * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1264
- * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1265
- * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
1266
- * _static_
1267
- * [.fromArray(values, [elementClass], [classType])](#Arrayable.fromArray) ⇒ [<code>Arrayable</code>](#Arrayable)
1268
-
1269
- <a name="new_Arrayable_new"></a>
1270
-
1271
- ### new Arrayable()
1272
- Create the new Arrayable instance, configure the Arrayable class.
1273
-
1274
- <a name="Arrayable+list"></a>
1275
-
1276
- ### arrayable.list [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1277
- Retrieve a copy of the innerList used.
1278
-
1279
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1280
- <a name="Arrayable+first"></a>
1281
-
1282
- ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
1283
- Retrieve the first Element from the Arrayable
1284
-
1285
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1286
- <a name="Arrayable+last"></a>
1287
-
1288
- ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
1289
- Retrieve the last Element from the Arrayable
1290
-
1291
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1292
- <a name="Arrayable+length"></a>
1293
-
1294
- ### arrayable.length ⇒ <code>number</code>
1295
- Return the length of the list.
1296
-
1297
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1298
- <a name="Arrayable+initialize"></a>
1299
-
1300
- ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
1301
- Initialize the inner list, should only run once.
1302
-
1303
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1304
-
1305
- | Param | Type | Description |
1306
- | --- | --- | --- |
1307
- | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
1308
-
1309
- <a name="Arrayable+insertAfter"></a>
1310
-
1311
- ### arrayable.insertAfter(node, newNode) [<code>Arrayable</code>](#Arrayable)
1312
- Insert a new node (or data) after a node.
1313
-
1314
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1315
-
1316
- | Param | Type | Description |
1317
- | --- | --- | --- |
1318
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1319
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
1320
-
1321
- <a name="Arrayable+insertBefore"></a>
1322
-
1323
- ### arrayable.insertBefore(node, newNode) [<code>Arrayable</code>](#Arrayable)
1324
- Insert a new node (or data) before a node.
1325
-
1326
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1327
-
1328
- | Param | Type | Description |
1329
- | --- | --- | --- |
1330
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1331
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
1332
-
1333
- <a name="Arrayable+append"></a>
1334
-
1335
- ### arrayable.append(node, after) [<code>Arrayable</code>](#Arrayable)
1336
- Add a node (or data) after the given (or last) node in the list.
1337
-
1338
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1339
-
1340
- | Param | Type | Description |
1341
- | --- | --- | --- |
1342
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
1343
- | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
1344
-
1345
- <a name="Arrayable+prepend"></a>
1346
-
1347
- ### arrayable.prepend(node, before) [<code>Arrayable</code>](#Arrayable)
1348
- Add a node (or data) before the given (or first) node in the list.
1349
-
1350
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1351
-
1352
- | Param | Type | Description |
1353
- | --- | --- | --- |
1354
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
1355
- | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
1356
-
1357
- <a name="Arrayable+remove"></a>
1358
-
1359
- ### arrayable.remove(node) [<code>ArrayElement</code>](#ArrayElement)
1360
- Remove an element from this arrayable.
1361
-
1362
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1363
-
1364
- | Param | Type | Description |
1365
- | --- | --- | --- |
1366
- | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
1367
-
1368
- <a name="Arrayable+item"></a>
1369
-
1370
- ### arrayable.item(index) [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1371
- Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
1372
-
1373
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1374
-
1375
- | Param | Type | Description |
1376
- | --- | --- | --- |
1377
- | index | <code>number</code> | The integer number for retrieving a node by position. |
1378
-
1379
- <a name="Arrayable+forEach"></a>
1380
-
1381
- ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
1382
- Be able to run forEach on this Arrayable to iterate over the elements.
1383
-
1384
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1385
-
1386
- | Param | Type | Description |
1387
- | --- | --- | --- |
1388
- | callback | <code>forEachCallback</code> | The function to call for-each element |
1389
- | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
1390
-
1391
- <a name="Arrayable.fromArray"></a>
1392
-
1393
- ### Arrayable.fromArray(values, [elementClass], [classType]) ⇒ [<code>Arrayable</code>](#Arrayable)
1394
- Convert an array to an Arrayable.
1395
-
1396
- **Kind**: static method of [<code>Arrayable</code>](#Arrayable)
1397
-
1398
- | Param | Type | Default | Description |
1399
- | --- | --- | --- | --- |
1400
- | values | <code>Array</code> | | An array of values which will be converted to elements in this arrayable |
1401
- | [elementClass] | <code>IsElement</code> | <code>ArrayElement</code> | The class to use for each element |
1402
- | [classType] | [<code>IsArrayable.&lt;ArrayElement&gt;</code>](#ArrayElement) | <code>Arrayable</code> | Provide the type of IsArrayable to use. |
1403
-
1404
- <a name="ArrayElement"></a>
1405
-
1406
- ## ArrayElement
1407
- Element represents a node in an Arrayable.
1408
-
1409
- **Kind**: global class
1410
-
1411
- * [ArrayElement](#ArrayElement)
1412
- * [new ArrayElement([data])](#new_ArrayElement_new)
1413
- * [.make(element, [classType])](#ArrayElement.make) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1414
- * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
1415
-
1416
- <a name="new_ArrayElement_new"></a>
1417
-
1418
- ### new ArrayElement([data])
1419
- Create the new Element instance, provide the data and optionally configure the type of Element.
1420
-
1421
-
1422
- | Param | Type | Default | Description |
1423
- | --- | --- | --- | --- |
1424
- | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
1425
-
1426
- <a name="ArrayElement.make"></a>
1427
-
1428
- ### ArrayElement.make(element, [classType]) [<code>ArrayElement</code>](#ArrayElement)
1429
- Make a new Element from the data given if it is not already a valid Element.
1430
-
1431
- **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1432
-
1433
- | Param | Type | Default | Description |
1434
- | --- | --- | --- | --- |
1435
- | element | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | | Return a valid ArrayElement instance from given data, or even an already valid one. |
1436
- | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1437
-
1438
- <a name="ArrayElement.fromArray"></a>
1439
-
1440
- ### ArrayElement.fromArray([values], [classType]) <code>Object</code>
1441
- Convert an array into Element instances, return the head and tail Elements.
1442
-
1443
- **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1444
-
1445
- | Param | Type | Default | Description |
1446
- | --- | --- | --- | --- |
1447
- | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
1448
- | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1449
-
1450
- <a name="services"></a>
1451
-
1452
- ## services
1453
- List helpful functions when dealing with collections.
1454
-
1455
- **Kind**: global constant
1456
- <a name="recipes"></a>
1457
-
1458
- ## recipes
1459
- List of class declarations that can be used to specify attributes for a style of object / class.
1460
-
1461
- **Kind**: global constant
1462
- <a name="parseTreeNext"></a>
1463
-
1464
- ## parseTreeNext(treeNode) ⇒ <code>IsTreeNode</code> \| <code>null</code>
1465
- Be able to parse over every node in a tree.
1466
- 1. Start at root (get root parent)
1467
- 2. Get first child (repeat until no children)
1468
- 3. Check next child
1469
- 4. Repeat 2
1470
- 5. Repeat 3
1471
- 6. If no next child, return to parent and repeat 3
1472
- 7. Stop at root (next is null and parent is null
1473
-
1474
- **Kind**: global function
1475
-
1476
- | Param | Type | Description |
1477
- | --- | --- | --- |
1478
- | treeNode | <code>IsTreeNode</code> | Provide a node in a tree and get the next node (left-first approach) |
1479
-
1480
- <a name="parseTree"></a>
1481
-
1482
- ## parseTree(tree, callback) <code>IsArrayable.&lt;IsTreeNode&gt;</code>
1483
- Loop over all the nodes in a tree starting from left and apply a callback for each
1484
-
1485
- **Kind**: global function
1486
-
1487
- | Param | Type |
1488
- | --- | --- |
1489
- | tree | <code>IsArrayable.&lt;IsTreeNode&gt;</code> |
1490
- | callback | <code>forEachCallback</code> |
1491
-
5
+ ## Modules
6
+
7
+ <dl>
8
+ <dt><a href="#module_collect-your-stuff">collect-your-stuff</a></dt>
9
+ <dd><p>All of the collections available.</p>
10
+ </dd>
11
+ </dl>
12
+
13
+ ## Classes
14
+
15
+ <dl>
16
+ <dt><a href="#TreeLinkerIterator">TreeLinkerIterator</a></dt>
17
+ <dd><p>Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.</p>
18
+ </dd>
19
+ <dt><a href="#Runnable">Runnable</a></dt>
20
+ <dd><p>Identify a class that can be run.</p>
21
+ </dd>
22
+ <dt><a href="#LinkerIterator">LinkerIterator</a></dt>
23
+ <dd><p>Class LinkerIterator returns the next value when using linkers of linked type lists.</p>
24
+ </dd>
25
+ <dt><a href="#DoubleLinkerIterator">DoubleLinkerIterator</a></dt>
26
+ <dd><p>Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.</p>
27
+ </dd>
28
+ <dt><a href="#ArrayIterator">ArrayIterator</a></dt>
29
+ <dd><p>Class ArrayIterator returns the next value when using elements of array type list.</p>
30
+ </dd>
31
+ <dt><a href="#Stackable">Stackable</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
32
+ <dd><p>Stackable represents a runnable entry in stack.</p>
33
+ </dd>
34
+ <dt><a href="#Stack">Stack</a></dt>
35
+ <dd><p>Store a collection of items which can only be inserted and removed from the top.</p>
36
+ </dd>
37
+ <dt><a href="#Queueable">Queueable</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
38
+ <dd><p>Queueable represents a runnable entry in a queue.</p>
39
+ </dd>
40
+ <dt><a href="#Queue">Queue</a></dt>
41
+ <dd><p>Maintain a series of queued items.</p>
42
+ </dd>
43
+ <dt><a href="#TreeLinker">TreeLinker</a> ⇐ <code><a href="#DoubleLinker">DoubleLinker</a></code></dt>
44
+ <dd><p>TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.</p>
45
+ </dd>
46
+ <dt><a href="#LinkedTreeList">LinkedTreeList</a> ⇐ <code><a href="#DoublyLinkedList">DoublyLinkedList</a></code></dt>
47
+ <dd><p>LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.</p>
48
+ </dd>
49
+ <dt><a href="#Linker">Linker</a> ⇐ <code><a href="#ArrayElement">ArrayElement</a></code></dt>
50
+ <dd><p>Linker represents a node in a LinkedList.</p>
51
+ </dd>
52
+ <dt><a href="#LinkedList">LinkedList</a> ⇐ <code><a href="#Arrayable">Arrayable</a></code></dt>
53
+ <dd><p>LinkedList represents a collection stored as a LinkedList with next references.</p>
54
+ </dd>
55
+ <dt><a href="#DoublyLinkedList">DoublyLinkedList</a> ⇐ <code><a href="#LinkedList">LinkedList</a></code></dt>
56
+ <dd><p>DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.</p>
57
+ </dd>
58
+ <dt><a href="#DoubleLinker">DoubleLinker</a> ⇐ <code><a href="#Linker">Linker</a></code></dt>
59
+ <dd><p>DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.</p>
60
+ </dd>
61
+ <dt><a href="#Arrayable">Arrayable</a></dt>
62
+ <dd><p>Arrayable represents a collection stored as an array.</p>
63
+ </dd>
64
+ <dt><a href="#ArrayElement">ArrayElement</a></dt>
65
+ <dd><p>Element represents a node in an Arrayable.</p>
66
+ </dd>
67
+ </dl>
68
+
69
+ ## Constants
70
+
71
+ <dl>
72
+ <dt><a href="#services">services</a></dt>
73
+ <dd><p>List helpful functions when dealing with collections.</p>
74
+ </dd>
75
+ <dt><a href="#recipes">recipes</a></dt>
76
+ <dd><p>List of class declarations that can be used to specify attributes for a style of object / class.</p>
77
+ </dd>
78
+ </dl>
79
+
80
+ ## Functions
81
+
82
+ <dl>
83
+ <dt><a href="#parseTreeNext">parseTreeNext(treeNode)</a> ⇒ <code>IsTreeNode</code> | <code>null</code></dt>
84
+ <dd><p>Be able to parse over every node in a tree.</p>
85
+ <ol>
86
+ <li>Start at root (get root parent)</li>
87
+ <li>Get first child (repeat until no children)</li>
88
+ <li>Check next child</li>
89
+ <li>Repeat 2</li>
90
+ <li>Repeat 3</li>
91
+ <li>If no next child, return to parent and repeat 3</li>
92
+ <li>Stop at root (next is null and parent is null</li>
93
+ </ol>
94
+ </dd>
95
+ <dt><a href="#parseTree">parseTree(tree, callback)</a> ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code></dt>
96
+ <dd><p>Loop over all the nodes in a tree starting from left and apply a callback for each</p>
97
+ </dd>
98
+ </dl>
99
+
100
+ <a name="module_collect-your-stuff"></a>
101
+
102
+ ## collect-your-stuff
103
+ All of the collections available.
104
+
105
+ **Version**: 1.0.0
106
+ **Author**: Joshua Heagle <joshuaheagle@gmail.com>
107
+ <a name="module_collect-your-stuff..collectYourStuff"></a>
108
+
109
+ ### collect-your-stuff~collectYourStuff
110
+ All methods exported from this module are encapsulated within collect-your-stuff.
111
+
112
+ **Kind**: inner constant of [<code>collect-your-stuff</code>](#module_collect-your-stuff)
113
+ <a name="TreeLinkerIterator"></a>
114
+
115
+ ## TreeLinkerIterator
116
+ Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.
117
+
118
+ **Kind**: global class
119
+ <a name="Runnable"></a>
120
+
121
+ ## Runnable
122
+ Identify a class that can be run.
123
+
124
+ **Kind**: global class
125
+
126
+ * [Runnable](#Runnable)
127
+ * [new Runnable(data)](#new_Runnable_new)
128
+ * _instance_
129
+ * [.task](#Runnable+task) ⇒ <code>function</code>
130
+ * [.run()](#Runnable+run) ⇒ <code>\*</code>
131
+ * _static_
132
+ * [.isRunnable(thing)](#Runnable.isRunnable) ⇒ <code>boolean</code>
133
+
134
+ <a name="new_Runnable_new"></a>
135
+
136
+ ### new Runnable(data)
137
+ Instantiate a Runnable class.
138
+
139
+
140
+ | Param | Type |
141
+ | --- | --- |
142
+ | data | <code>\*</code> |
143
+
144
+ <a name="Runnable+task"></a>
145
+
146
+ ### runnable.task ⇒ <code>function</code>
147
+ Retrieve the data which should be formed as a task.
148
+
149
+ **Kind**: instance property of [<code>Runnable</code>](#Runnable)
150
+ <a name="Runnable+run"></a>
151
+
152
+ ### runnable.run() ⇒ <code>\*</code>
153
+ Run the runnable task.
154
+
155
+ **Kind**: instance method of [<code>Runnable</code>](#Runnable)
156
+ <a name="Runnable.isRunnable"></a>
157
+
158
+ ### Runnable.isRunnable(thing) ⇒ <code>boolean</code>
159
+ Check if a given thing is Runnable
160
+
161
+ **Kind**: static method of [<code>Runnable</code>](#Runnable)
162
+
163
+ | Param | Type |
164
+ | --- | --- |
165
+ | thing | <code>\*</code> |
166
+
167
+ <a name="LinkerIterator"></a>
168
+
169
+ ## LinkerIterator
170
+ Class LinkerIterator returns the next value when using linkers of linked type lists.
171
+
172
+ **Kind**: global class
173
+ <a name="DoubleLinkerIterator"></a>
174
+
175
+ ## DoubleLinkerIterator
176
+ Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
177
+
178
+ **Kind**: global class
179
+ <a name="ArrayIterator"></a>
180
+
181
+ ## ArrayIterator
182
+ Class ArrayIterator returns the next value when using elements of array type list.
183
+
184
+ **Kind**: global class
185
+ <a name="Stackable"></a>
186
+
187
+ ## Stackable ⇐ [<code>Linker</code>](#Linker)
188
+ Stackable represents a runnable entry in stack.
189
+
190
+ **Kind**: global class
191
+ **Extends**: [<code>Linker</code>](#Linker)
192
+
193
+ * [Stackable](#Stackable) ⇐ [<code>Linker</code>](#Linker)
194
+ * [new Stackable([stackData])](#new_Stackable_new)
195
+ * _instance_
196
+ * [.task](#Stackable+task) ⇒ <code>\*</code>
197
+ * [.run()](#Stackable+run) ⇒ <code>\*</code>
198
+ * _static_
199
+ * [.make(stackable, [classType])](#Stackable.make) ⇒ [<code>Stackable</code>](#Stackable)
200
+ * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
201
+
202
+ <a name="new_Stackable_new"></a>
203
+
204
+ ### new Stackable([stackData])
205
+ Create a stackable item that can be used in a stack.
206
+
207
+
208
+ | Param | Type | Default | Description |
209
+ | --- | --- | --- | --- |
210
+ | [stackData] | <code>Object</code> | <code>{}</code> | |
211
+ | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
212
+ | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
213
+ | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
214
+
215
+ <a name="Stackable+task"></a>
216
+
217
+ ### stackable.task ⇒ <code>\*</code>
218
+ Retrieve the data which should be formed as a task.
219
+
220
+ **Kind**: instance property of [<code>Stackable</code>](#Stackable)
221
+ <a name="Stackable+run"></a>
222
+
223
+ ### stackable.run() ⇒ <code>\*</code>
224
+ Run the stacked task.
225
+
226
+ **Kind**: instance method of [<code>Stackable</code>](#Stackable)
227
+ <a name="Stackable.make"></a>
228
+
229
+ ### Stackable.make(stackable, [classType]) ⇒ [<code>Stackable</code>](#Stackable)
230
+ Make a new Stackable from the data given if it is not already a valid Stackable.
231
+
232
+ **Kind**: static method of [<code>Stackable</code>](#Stackable)
233
+
234
+ | Param | Type | Default | Description |
235
+ | --- | --- | --- | --- |
236
+ | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | | Return a valid Stackable instance from given data, or even an already valid one. |
237
+ | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
238
+
239
+ <a name="Stackable.fromArray"></a>
240
+
241
+ ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
242
+ Convert an array into Stackable instances, return the head and tail Stackables.
243
+
244
+ **Kind**: static method of [<code>Stackable</code>](#Stackable)
245
+
246
+ | Param | Type | Default | Description |
247
+ | --- | --- | --- | --- |
248
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
249
+ | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
250
+
251
+ <a name="Stack"></a>
252
+
253
+ ## Stack
254
+ Store a collection of items which can only be inserted and removed from the top.
255
+
256
+ **Kind**: global class
257
+
258
+ * [Stack](#Stack)
259
+ * [new Stack(stackedList, listClass, stackableClass)](#new_Stack_new)
260
+ * _instance_
261
+ * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
262
+ * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
263
+ * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
264
+ * [.push(stackable)](#Stack+push)
265
+ * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
266
+ * [.size()](#Stack+size) ⇒ <code>number</code>
267
+ * _static_
268
+ * [.fromArray(values, stackableClass, listClass)](#Stack.fromArray) ⇒ [<code>Stack</code>](#Stack)
269
+
270
+ <a name="new_Stack_new"></a>
271
+
272
+ ### new Stack(stackedList, listClass, stackableClass)
273
+ Instantiate the state with the starter stacked list.
274
+
275
+
276
+ | Param | Type |
277
+ | --- | --- |
278
+ | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) |
279
+ | listClass | <code>IsArrayable</code> |
280
+ | stackableClass | [<code>Stackable</code>](#Stackable) |
281
+
282
+ <a name="Stack+empty"></a>
283
+
284
+ ### stack.empty() ⇒ <code>boolean</code>
285
+ Return true if the stack is empty (there are no tasks in the stacked list)
286
+
287
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
288
+ <a name="Stack+top"></a>
289
+
290
+ ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
291
+ Take a look at the next stacked task
292
+
293
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
294
+ <a name="Stack+pop"></a>
295
+
296
+ ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
297
+ Remove the next stacked task and return it.
298
+
299
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
300
+ <a name="Stack+push"></a>
301
+
302
+ ### stack.push(stackable)
303
+ Push a stackable task to the top of the stack.
304
+
305
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
306
+
307
+ | Param | Type | Description |
308
+ | --- | --- | --- |
309
+ | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
310
+
311
+ <a name="Stack+remove"></a>
312
+
313
+ ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
314
+ Remove the next stacked task and return it.
315
+
316
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
317
+ <a name="Stack+size"></a>
318
+
319
+ ### stack.size() ⇒ <code>number</code>
320
+ Get the size of the current stack.
321
+
322
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
323
+ <a name="Stack.fromArray"></a>
324
+
325
+ ### Stack.fromArray(values, stackableClass, listClass) ⇒ [<code>Stack</code>](#Stack)
326
+ Convert an array to a Stack.
327
+
328
+ **Kind**: static method of [<code>Stack</code>](#Stack)
329
+
330
+ | Param | Type | Description |
331
+ | --- | --- | --- |
332
+ | values | <code>Array</code> | An array of values which will be converted to stackables in this queue |
333
+ | stackableClass | [<code>Stackable</code>](#Stackable) | The class to use for each stackable |
334
+ | listClass | [<code>Stack</code>](#Stack) \| <code>Iterable</code> | The class to use to manage the stackables |
335
+
336
+ <a name="Queueable"></a>
337
+
338
+ ## Queueable ⇐ [<code>Linker</code>](#Linker)
339
+ Queueable represents a runnable entry in a queue.
340
+
341
+ **Kind**: global class
342
+ **Extends**: [<code>Linker</code>](#Linker)
343
+
344
+ * [Queueable](#Queueable) ⇐ [<code>Linker</code>](#Linker)
345
+ * [new Queueable([queueableData])](#new_Queueable_new)
346
+ * _instance_
347
+ * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
348
+ * [.task](#Queueable+task) ⇒ <code>\*</code>
349
+ * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
350
+ * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
351
+ * _static_
352
+ * [.make(queueable, [classType])](#Queueable.make) ⇒ [<code>Queueable</code>](#Queueable)
353
+ * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
354
+
355
+ <a name="new_Queueable_new"></a>
356
+
357
+ ### new Queueable([queueableData])
358
+ Create a queueable item that can be used in a queue.
359
+
360
+
361
+ | Param | Type | Default | Description |
362
+ | --- | --- | --- | --- |
363
+ | [queueableData] | <code>Object</code> | <code>{}</code> | |
364
+ | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
365
+ | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
366
+ | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
367
+
368
+ <a name="Queueable+isReady"></a>
369
+
370
+ ### queueable.isReady ⇒ <code>boolean</code>
371
+ Check ready state.
372
+
373
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
374
+ <a name="Queueable+task"></a>
375
+
376
+ ### queueable.task ⇒ <code>\*</code>
377
+ Retrieve the data which should be formed as a task.
378
+
379
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
380
+ <a name="Queueable+markCompleted"></a>
381
+
382
+ ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
383
+ Set this queueable as completed.
384
+
385
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
386
+
387
+ | Param | Type | Default | Description |
388
+ | --- | --- | --- | --- |
389
+ | completeResponse | <code>Object</code> | | |
390
+ | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
391
+ | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
392
+ | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
393
+
394
+ <a name="Queueable+run"></a>
395
+
396
+ ### queueable.run() ⇒ <code>completeResponse</code>
397
+ Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
398
+
399
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
400
+ <a name="Queueable.make"></a>
401
+
402
+ ### Queueable.make(queueable, [classType]) ⇒ [<code>Queueable</code>](#Queueable)
403
+ Make a new Queueable from the data given if it is not already a valid Queueable.
404
+
405
+ **Kind**: static method of [<code>Queueable</code>](#Queueable)
406
+
407
+ | Param | Type | Default | Description |
408
+ | --- | --- | --- | --- |
409
+ | queueable | [<code>Queueable</code>](#Queueable) \| <code>\*</code> | | Return a valid Queueable instance from given data, or even an already valid one. |
410
+ | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
411
+
412
+ <a name="Queueable.fromArray"></a>
413
+
414
+ ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
415
+ Convert an array into Queueable instances, return the head and tail Queueables.
416
+
417
+ **Kind**: static method of [<code>Queueable</code>](#Queueable)
418
+
419
+ | Param | Type | Default | Description |
420
+ | --- | --- | --- | --- |
421
+ | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
422
+ | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
423
+
424
+ <a name="Queue"></a>
425
+
426
+ ## Queue
427
+ Maintain a series of queued items.
428
+
429
+ **Kind**: global class
430
+
431
+ * [Queue](#Queue)
432
+ * [new Queue(queuedList, listClass, queueableClass)](#new_Queue_new)
433
+ * _instance_
434
+ * [.dequeue()](#Queue+dequeue) ⇒ <code>completeResponse</code> \| <code>\*</code>
435
+ * [.empty()](#Queue+empty) ⇒ <code>boolean</code>
436
+ * [.enqueue(queueable)](#Queue+enqueue)
437
+ * [.peek()](#Queue+peek) ⇒ [<code>Queueable</code>](#Queueable)
438
+ * [.remove()](#Queue+remove) ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
439
+ * [.size()](#Queue+size) ⇒ <code>number</code>
440
+ * _static_
441
+ * [.fromArray(values, queueableClass, listClass)](#Queue.fromArray) ⇒ [<code>Queue</code>](#Queue)
442
+
443
+ <a name="new_Queue_new"></a>
444
+
445
+ ### new Queue(queuedList, listClass, queueableClass)
446
+ Instantiate the queue with the given queue list.
447
+
448
+
449
+ | Param | Type | Description |
450
+ | --- | --- | --- |
451
+ | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | Give the list of queueables to start in this queue. |
452
+ | listClass | <code>IsArrayable</code> | |
453
+ | queueableClass | [<code>Queueable</code>](#Queueable) | |
454
+
455
+ <a name="Queue+dequeue"></a>
456
+
457
+ ### queue.dequeue() ⇒ <code>completeResponse</code> \| <code>\*</code>
458
+ Take a queued task from the front of the queue and run it if ready.
459
+
460
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
461
+ <a name="Queue+empty"></a>
462
+
463
+ ### queue.empty() ⇒ <code>boolean</code>
464
+ Return true if the queue is empty (there are no tasks in the queue list)
465
+
466
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
467
+ <a name="Queue+enqueue"></a>
468
+
469
+ ### queue.enqueue(queueable)
470
+ Add a queued task to the end of the queue
471
+
472
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
473
+
474
+ | Param | Type | Description |
475
+ | --- | --- | --- |
476
+ | queueable | [<code>Queueable</code>](#Queueable) | Add a new queueable to the end of the queue |
477
+
478
+ <a name="Queue+peek"></a>
479
+
480
+ ### queue.peek() ⇒ [<code>Queueable</code>](#Queueable)
481
+ Take a look at the next queued task
482
+
483
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
484
+ <a name="Queue+remove"></a>
485
+
486
+ ### queue.remove() ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
487
+ Remove the next queued item and return it.
488
+
489
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
490
+ <a name="Queue+size"></a>
491
+
492
+ ### queue.size() ⇒ <code>number</code>
493
+ Get the length of the current queue.
494
+
495
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
496
+ <a name="Queue.fromArray"></a>
497
+
498
+ ### Queue.fromArray(values, queueableClass, listClass) ⇒ [<code>Queue</code>](#Queue)
499
+ Convert an array to a Queue.
500
+
501
+ **Kind**: static method of [<code>Queue</code>](#Queue)
502
+
503
+ | Param | Type | Description |
504
+ | --- | --- | --- |
505
+ | values | <code>Array</code> | An array of values which will be converted to queueables in this queue |
506
+ | queueableClass | [<code>Queueable</code>](#Queueable) | The class to use for each queueable |
507
+ | listClass | [<code>Queue</code>](#Queue) \| <code>Iterable</code> | The class to use to manage the queueables |
508
+
509
+ <a name="TreeLinker"></a>
510
+
511
+ ## TreeLinker ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
512
+ TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.
513
+
514
+ **Kind**: global class
515
+ **Extends**: [<code>DoubleLinker</code>](#DoubleLinker)
516
+
517
+ * [TreeLinker](#TreeLinker) ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
518
+ * [new TreeLinker([settings])](#new_TreeLinker_new)
519
+ * _instance_
520
+ * [.childrenFromArray(children, classType)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
521
+ * _static_
522
+ * [.make(linker, [classType])](#TreeLinker.make) ⇒ [<code>TreeLinker</code>](#TreeLinker)
523
+ * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
524
+
525
+ <a name="new_TreeLinker_new"></a>
526
+
527
+ ### new TreeLinker([settings])
528
+ Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
529
+
530
+
531
+ | Param | Type | Default | Description |
532
+ | --- | --- | --- | --- |
533
+ | [settings] | <code>Object</code> | <code>{}</code> | |
534
+ | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
535
+ | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
536
+ | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
537
+ | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
538
+ | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
539
+
540
+ <a name="TreeLinker+childrenFromArray"></a>
541
+
542
+ ### treeLinker.childrenFromArray(children, classType) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
543
+ Create the children for this tree from an array.
544
+
545
+ **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
546
+
547
+ | Param | Type | Description |
548
+ | --- | --- | --- |
549
+ | children | <code>Array</code> \| <code>null</code> | Provide an array of data / linker references to be children of this tree node. |
550
+ | classType | <code>IsTree</code> | Provide the type of IsElement to use. |
551
+
552
+ <a name="TreeLinker.make"></a>
553
+
554
+ ### TreeLinker.make(linker, [classType]) ⇒ [<code>TreeLinker</code>](#TreeLinker)
555
+ Make a new DoubleLinker from the data given if it is not already a valid Linker.
556
+
557
+ **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
558
+
559
+ | Param | Type | Default | Description |
560
+ | --- | --- | --- | --- |
561
+ | linker | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | | Return a valid TreeLinker instance from given data, or even an already valid one. |
562
+ | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
563
+
564
+ <a name="TreeLinker.fromArray"></a>
565
+
566
+ ### TreeLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
567
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
568
+
569
+ **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
570
+
571
+ | Param | Type | Default | Description |
572
+ | --- | --- | --- | --- |
573
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
574
+ | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
575
+
576
+ <a name="LinkedTreeList"></a>
577
+
578
+ ## LinkedTreeList ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
579
+ LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.
580
+
581
+ **Kind**: global class
582
+ **Extends**: [<code>DoublyLinkedList</code>](#DoublyLinkedList)
583
+
584
+ * [LinkedTreeList](#LinkedTreeList) [<code>DoublyLinkedList</code>](#DoublyLinkedList)
585
+ * [new LinkedTreeList()](#new_LinkedTreeList_new)
586
+ * _instance_
587
+ * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
588
+ * [.first](#LinkedTreeList+first) ⇒ [<code>TreeLinker</code>](#TreeLinker)
589
+ * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
590
+ * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
591
+ * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
592
+ * [.parent](#LinkedTreeList+parent)
593
+ * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
594
+ * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
595
+ * [.setChildren(item, children)](#LinkedTreeList+setChildren)
596
+ * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
597
+ * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
598
+ * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
599
+ * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
600
+ * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
601
+ * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
602
+ * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
603
+ * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
604
+ * _static_
605
+ * [.fromArray([values], [linkerClass], [classType])](#LinkedTreeList.fromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
606
+
607
+ <a name="new_LinkedTreeList_new"></a>
608
+
609
+ ### new LinkedTreeList()
610
+ Create the new LinkedTreeList instance, configure the list class.
611
+
612
+ <a name="LinkedTreeList+list"></a>
613
+
614
+ ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
615
+ Retrieve a copy of the innerList used.
616
+
617
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
618
+ **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
619
+ <a name="LinkedTreeList+first"></a>
620
+
621
+ ### linkedTreeList.first ⇒ [<code>TreeLinker</code>](#TreeLinker)
622
+ Retrieve the first TreeLinker in the list.
623
+
624
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
625
+ **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
626
+ <a name="LinkedTreeList+last"></a>
627
+
628
+ ### linkedTreeList.last ⇒ [<code>TreeLinker</code>](#TreeLinker)
629
+ Retrieve the last TreeLinker in the list.
630
+
631
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
632
+ **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
633
+ <a name="LinkedTreeList+length"></a>
634
+
635
+ ### linkedTreeList.length ⇒ <code>number</code>
636
+ Return the length of the list.
637
+
638
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
639
+ **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
640
+ <a name="LinkedTreeList+parent"></a>
641
+
642
+ ### linkedTreeList.parent ⇒ [<code>TreeLinker</code>](#TreeLinker)
643
+ Get the parent of this tree list.
644
+
645
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
646
+ <a name="LinkedTreeList+parent"></a>
647
+
648
+ ### linkedTreeList.parent
649
+ Set the parent of this tree list
650
+
651
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
652
+
653
+ | Param | Type | Description |
654
+ | --- | --- | --- |
655
+ | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
656
+
657
+ <a name="LinkedTreeList+rootParent"></a>
658
+
659
+ ### linkedTreeList.rootParent ⇒ [<code>TreeLinker</code>](#TreeLinker)
660
+ Return the root parent of the entire tree.
661
+
662
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
663
+ <a name="LinkedTreeList+initialize"></a>
664
+
665
+ ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
666
+ Initialize the inner list, should only run once.
667
+
668
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
669
+ **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
670
+
671
+ | Param | Type | Description |
672
+ | --- | --- | --- |
673
+ | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
674
+
675
+ <a name="LinkedTreeList+setChildren"></a>
676
+
677
+ ### linkedTreeList.setChildren(item, children)
678
+ Set the children on a parent item.
679
+
680
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
681
+
682
+ | Param | Type | Description |
683
+ | --- | --- | --- |
684
+ | item | [<code>TreeLinker</code>](#TreeLinker) | The TreeLinker node that will be the parent of the children |
685
+ | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | The LinkedTreeList which has the child nodes to use |
686
+
687
+ <a name="LinkedTreeList+insertAfter"></a>
688
+
689
+ ### linkedTreeList.insertAfter(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
690
+ Insert a new node (or data) after a node.
691
+
692
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
693
+ **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
694
+
695
+ | Param | Type | Description |
696
+ | --- | --- | --- |
697
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
698
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
699
+
700
+ <a name="LinkedTreeList+insertBefore"></a>
701
+
702
+ ### linkedTreeList.insertBefore(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
703
+ Insert a new node (or data) before a node.
704
+
705
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
706
+ **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
707
+
708
+ | Param | Type | Description |
709
+ | --- | --- | --- |
710
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
711
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
712
+
713
+ <a name="LinkedTreeList+append"></a>
714
+
715
+ ### linkedTreeList.append(node, after) ⇒ [<code>TreeLinker</code>](#TreeLinker)
716
+ Add a node (or data) after the given (or last) node in the list.
717
+
718
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
719
+ **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
720
+
721
+ | Param | Type | Description |
722
+ | --- | --- | --- |
723
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
724
+ | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
725
+
726
+ <a name="LinkedTreeList+prepend"></a>
727
+
728
+ ### linkedTreeList.prepend(node, before) ⇒ [<code>TreeLinker</code>](#TreeLinker)
729
+ Add a node (or data) before the given (or first) node in the list.
730
+
731
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
732
+ **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
733
+
734
+ | Param | Type | Description |
735
+ | --- | --- | --- |
736
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
737
+ | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
738
+
739
+ <a name="LinkedTreeList+remove"></a>
740
+
741
+ ### linkedTreeList.remove(node) ⇒ [<code>TreeLinker</code>](#TreeLinker)
742
+ Remove a linker from this linked list.
743
+
744
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
745
+ **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
746
+
747
+ | Param | Type | Description |
748
+ | --- | --- | --- |
749
+ | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
750
+
751
+ <a name="LinkedTreeList+reset"></a>
752
+
753
+ ### linkedTreeList.reset() ⇒ [<code>TreeLinker</code>](#TreeLinker)
754
+ Refresh all references and return head reference.
755
+
756
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
757
+ **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
758
+ <a name="LinkedTreeList+item"></a>
759
+
760
+ ### linkedTreeList.item(index) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
761
+ Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
762
+
763
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
764
+ **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
765
+
766
+ | Param | Type | Description |
767
+ | --- | --- | --- |
768
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
769
+
770
+ <a name="LinkedTreeList+forEach"></a>
771
+
772
+ ### linkedTreeList.forEach(callback, thisArg)
773
+ Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
774
+
775
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
776
+ **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
777
+
778
+ | Param | Type | Description |
779
+ | --- | --- | --- |
780
+ | callback | <code>forEachCallback</code> | The function to call for-each tree node |
781
+ | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
782
+
783
+ <a name="LinkedTreeList.fromArray"></a>
784
+
785
+ ### LinkedTreeList.fromArray([values], [linkerClass], [classType]) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
786
+ Convert an array into a LinkedTreeList instance, return the new instance.
787
+
788
+ **Kind**: static method of [<code>LinkedTreeList</code>](#LinkedTreeList)
789
+
790
+ | Param | Type | Default | Description |
791
+ | --- | --- | --- | --- |
792
+ | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to nodes in this tree-list |
793
+ | [linkerClass] | [<code>TreeLinker</code>](#TreeLinker) | <code>TreeLinker</code> | The class to use for each node |
794
+ | [classType] | [<code>IsArrayable.&lt;TreeLinker&gt;</code>](#TreeLinker) | <code>LinkedTreeList</code> | Provide the type of IsArrayable to use. |
795
+
796
+ <a name="Linker"></a>
797
+
798
+ ## Linker ⇐ [<code>ArrayElement</code>](#ArrayElement)
799
+ Linker represents a node in a LinkedList.
800
+
801
+ **Kind**: global class
802
+ **Extends**: [<code>ArrayElement</code>](#ArrayElement)
803
+
804
+ * [Linker](#Linker) ⇐ [<code>ArrayElement</code>](#ArrayElement)
805
+ * [new Linker([nodeData])](#new_Linker_new)
806
+ * [.make(linker, [classType])](#Linker.make) ⇒ [<code>Linker</code>](#Linker)
807
+ * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
808
+
809
+ <a name="new_Linker_new"></a>
810
+
811
+ ### new Linker([nodeData])
812
+ Create the new Linker instance, provide the data and optionally give the next Linker.
813
+
814
+
815
+ | Param | Type | Default | Description |
816
+ | --- | --- | --- | --- |
817
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
818
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
819
+ | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
820
+
821
+ <a name="Linker.make"></a>
822
+
823
+ ### Linker.make(linker, [classType]) ⇒ [<code>Linker</code>](#Linker)
824
+ Make a new Linker from the data given if it is not already a valid Linker.
825
+
826
+ **Kind**: static method of [<code>Linker</code>](#Linker)
827
+
828
+ | Param | Type | Default | Description |
829
+ | --- | --- | --- | --- |
830
+ | linker | [<code>Linker</code>](#Linker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
831
+ | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
832
+
833
+ <a name="Linker.fromArray"></a>
834
+
835
+ ### Linker.fromArray([values], [classType]) ⇒ <code>Object</code>
836
+ Convert an array into Linker instances, return the head and tail Linkers.
837
+
838
+ **Kind**: static method of [<code>Linker</code>](#Linker)
839
+
840
+ | Param | Type | Default | Description |
841
+ | --- | --- | --- | --- |
842
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
843
+ | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
844
+
845
+ <a name="LinkedList"></a>
846
+
847
+ ## LinkedList ⇐ [<code>Arrayable</code>](#Arrayable)
848
+ LinkedList represents a collection stored as a LinkedList with next references.
849
+
850
+ **Kind**: global class
851
+ **Extends**: [<code>Arrayable</code>](#Arrayable)
852
+
853
+ * [LinkedList](#LinkedList) [<code>Arrayable</code>](#Arrayable)
854
+ * [new LinkedList()](#new_LinkedList_new)
855
+ * _instance_
856
+ * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
857
+ * [.first](#LinkedList+first) ⇒ [<code>Linker</code>](#Linker)
858
+ * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
859
+ * [.length](#LinkedList+length) ⇒ <code>number</code>
860
+ * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
861
+ * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
862
+ * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
863
+ * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
864
+ * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
865
+ * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
866
+ * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
867
+ * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
868
+ * _static_
869
+ * [.fromArray(values, linkerClass, [classType])](#LinkedList.fromArray) ⇒ [<code>LinkedList</code>](#LinkedList)
870
+
871
+ <a name="new_LinkedList_new"></a>
872
+
873
+ ### new LinkedList()
874
+ Create the new LinkedList instance.
875
+
876
+ <a name="LinkedList+list"></a>
877
+
878
+ ### linkedList.list ⇒ [<code>Linker</code>](#Linker)
879
+ Retrieve a copy of the innerList used.
880
+
881
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
882
+ **Overrides**: [<code>list</code>](#Arrayable+list)
883
+ <a name="LinkedList+first"></a>
884
+
885
+ ### linkedList.first ⇒ [<code>Linker</code>](#Linker)
886
+ Retrieve the first Linker in the list.
887
+
888
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
889
+ **Overrides**: [<code>first</code>](#Arrayable+first)
890
+ <a name="LinkedList+last"></a>
891
+
892
+ ### linkedList.last ⇒ [<code>Linker</code>](#Linker)
893
+ Retrieve the last Linker in the list.
894
+
895
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
896
+ **Overrides**: [<code>last</code>](#Arrayable+last)
897
+ <a name="LinkedList+length"></a>
898
+
899
+ ### linkedList.length ⇒ <code>number</code>
900
+ Return the length of the list.
901
+
902
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
903
+ **Overrides**: [<code>length</code>](#Arrayable+length)
904
+ <a name="LinkedList+initialize"></a>
905
+
906
+ ### linkedList.initialize(initialList) ⇒ [<code>LinkedList</code>](#LinkedList)
907
+ Initialize the inner list, should only run once.
908
+
909
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
910
+ **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
911
+
912
+ | Param | Type | Description |
913
+ | --- | --- | --- |
914
+ | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
915
+
916
+ <a name="LinkedList+insertAfter"></a>
917
+
918
+ ### linkedList.insertAfter(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
919
+ Insert a new node (or data) after a node.
920
+
921
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
922
+ **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
923
+
924
+ | Param | Type | Description |
925
+ | --- | --- | --- |
926
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
927
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
928
+
929
+ <a name="LinkedList+insertBefore"></a>
930
+
931
+ ### linkedList.insertBefore(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
932
+ Insert a new node (or data) before a node.
933
+
934
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
935
+ **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
936
+
937
+ | Param | Type | Description |
938
+ | --- | --- | --- |
939
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
940
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
941
+
942
+ <a name="LinkedList+append"></a>
943
+
944
+ ### linkedList.append(node, after) ⇒ [<code>Linker</code>](#Linker)
945
+ Add a node (or data) after the given (or last) node in the list.
946
+
947
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
948
+ **Overrides**: [<code>append</code>](#Arrayable+append)
949
+
950
+ | Param | Type | Description |
951
+ | --- | --- | --- |
952
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
953
+ | after | [<code>Linker</code>](#Linker) | The existing last node |
954
+
955
+ <a name="LinkedList+prepend"></a>
956
+
957
+ ### linkedList.prepend(node, before) ⇒ [<code>Linker</code>](#Linker)
958
+ Add a node (or data) before the given (or first) node in the list.
959
+
960
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
961
+ **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
962
+
963
+ | Param | Type | Description |
964
+ | --- | --- | --- |
965
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
966
+ | before | [<code>Linker</code>](#Linker) | The existing first node |
967
+
968
+ <a name="LinkedList+remove"></a>
969
+
970
+ ### linkedList.remove(node) ⇒ [<code>Linker</code>](#Linker)
971
+ Remove a linker from this linked list.
972
+
973
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
974
+ **Overrides**: [<code>remove</code>](#Arrayable+remove)
975
+
976
+ | Param | Type | Description |
977
+ | --- | --- | --- |
978
+ | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
979
+
980
+ <a name="LinkedList+item"></a>
981
+
982
+ ### linkedList.item(index) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
983
+ Retrieve a Linker item from this list by numeric index, otherwise return null.
984
+
985
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
986
+ **Overrides**: [<code>item</code>](#Arrayable+item)
987
+
988
+ | Param | Type | Description |
989
+ | --- | --- | --- |
990
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
991
+
992
+ <a name="LinkedList+forEach"></a>
993
+
994
+ ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
995
+ Be able to run forEach on this LinkedList to iterate over the linkers.
996
+
997
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
998
+ **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
999
+
1000
+ | Param | Type | Description |
1001
+ | --- | --- | --- |
1002
+ | callback | <code>forEachCallback</code> | The function to call for-each linker |
1003
+ | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
1004
+
1005
+ <a name="LinkedList.fromArray"></a>
1006
+
1007
+ ### LinkedList.fromArray(values, linkerClass, [classType]) ⇒ [<code>LinkedList</code>](#LinkedList)
1008
+ Convert an array to a LinkedList.
1009
+
1010
+ **Kind**: static method of [<code>LinkedList</code>](#LinkedList)
1011
+
1012
+ | Param | Type | Default | Description |
1013
+ | --- | --- | --- | --- |
1014
+ | values | <code>Array</code> | | An array of values which will be converted to linkers in this linked-list |
1015
+ | linkerClass | <code>IsLinker</code> | | The class to use for each linker |
1016
+ | [classType] | [<code>IsArrayable.&lt;Linker&gt;</code>](#Linker) | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1017
+
1018
+ <a name="DoublyLinkedList"></a>
1019
+
1020
+ ## DoublyLinkedList ⇐ [<code>LinkedList</code>](#LinkedList)
1021
+ DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.
1022
+
1023
+ **Kind**: global class
1024
+ **Extends**: [<code>LinkedList</code>](#LinkedList)
1025
+
1026
+ * [DoublyLinkedList](#DoublyLinkedList) [<code>LinkedList</code>](#LinkedList)
1027
+ * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
1028
+ * _instance_
1029
+ * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1030
+ * [.first](#DoublyLinkedList+first) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1031
+ * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1032
+ * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
1033
+ * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1034
+ * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1035
+ * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1036
+ * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1037
+ * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1038
+ * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1039
+ * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1040
+ * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1041
+ * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
1042
+ * _static_
1043
+ * [.fromArray([values], [linkerClass], [classType])](#DoublyLinkedList.fromArray) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1044
+
1045
+ <a name="new_DoublyLinkedList_new"></a>
1046
+
1047
+ ### new DoublyLinkedList()
1048
+ Create the new DoublyLinkedList instance.
1049
+
1050
+ <a name="DoublyLinkedList+list"></a>
1051
+
1052
+ ### doublyLinkedList.list ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1053
+ Retrieve a copy of the innerList used.
1054
+
1055
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1056
+ **Overrides**: [<code>list</code>](#LinkedList+list)
1057
+ <a name="DoublyLinkedList+first"></a>
1058
+
1059
+ ### doublyLinkedList.first ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1060
+ Retrieve the first DoubleLinker in the list.
1061
+
1062
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1063
+ **Overrides**: [<code>first</code>](#LinkedList+first)
1064
+ <a name="DoublyLinkedList+last"></a>
1065
+
1066
+ ### doublyLinkedList.last ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1067
+ Retrieve the last DoubleLinker in the list.
1068
+
1069
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1070
+ **Overrides**: [<code>last</code>](#LinkedList+last)
1071
+ <a name="DoublyLinkedList+length"></a>
1072
+
1073
+ ### doublyLinkedList.length ⇒ <code>number</code>
1074
+ Return the length of the list.
1075
+
1076
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1077
+ **Overrides**: [<code>length</code>](#LinkedList+length)
1078
+ <a name="DoublyLinkedList+initialize"></a>
1079
+
1080
+ ### doublyLinkedList.initialize(initialList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1081
+ Initialize the inner list, should only run once.
1082
+
1083
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1084
+ **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
1085
+
1086
+ | Param | Type | Description |
1087
+ | --- | --- | --- |
1088
+ | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
1089
+
1090
+ <a name="DoublyLinkedList+insertAfter"></a>
1091
+
1092
+ ### doublyLinkedList.insertAfter(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1093
+ Insert a new node (or data) after a node.
1094
+
1095
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1096
+ **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
1097
+
1098
+ | Param | Type | Description |
1099
+ | --- | --- | --- |
1100
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1101
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
1102
+
1103
+ <a name="DoublyLinkedList+insertBefore"></a>
1104
+
1105
+ ### doublyLinkedList.insertBefore(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1106
+ Insert a new node (or data) before a node.
1107
+
1108
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1109
+ **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
1110
+
1111
+ | Param | Type | Description |
1112
+ | --- | --- | --- |
1113
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1114
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
1115
+
1116
+ <a name="DoublyLinkedList+append"></a>
1117
+
1118
+ ### doublyLinkedList.append(node, after) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1119
+ Add a node (or data) after the given (or last) node in the list.
1120
+
1121
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1122
+ **Overrides**: [<code>append</code>](#LinkedList+append)
1123
+
1124
+ | Param | Type | Description |
1125
+ | --- | --- | --- |
1126
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
1127
+ | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
1128
+
1129
+ <a name="DoublyLinkedList+prepend"></a>
1130
+
1131
+ ### doublyLinkedList.prepend(node, before) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1132
+ Add a node (or data) before the given (or first) node in the list.
1133
+
1134
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1135
+ **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
1136
+
1137
+ | Param | Type | Description |
1138
+ | --- | --- | --- |
1139
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
1140
+ | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
1141
+
1142
+ <a name="DoublyLinkedList+remove"></a>
1143
+
1144
+ ### doublyLinkedList.remove(node) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1145
+ Remove a linker from this linked list.
1146
+
1147
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1148
+ **Overrides**: [<code>remove</code>](#LinkedList+remove)
1149
+
1150
+ | Param | Type | Description |
1151
+ | --- | --- | --- |
1152
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
1153
+
1154
+ <a name="DoublyLinkedList+reset"></a>
1155
+
1156
+ ### doublyLinkedList.reset() ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1157
+ Refresh all references and return head reference.
1158
+
1159
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1160
+ <a name="DoublyLinkedList+item"></a>
1161
+
1162
+ ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1163
+ Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
1164
+
1165
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1166
+ **Overrides**: [<code>item</code>](#LinkedList+item)
1167
+
1168
+ | Param | Type | Description |
1169
+ | --- | --- | --- |
1170
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
1171
+
1172
+ <a name="DoublyLinkedList+forEach"></a>
1173
+
1174
+ ### doublyLinkedList.forEach(callback, thisArg)
1175
+ Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
1176
+
1177
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1178
+ **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
1179
+
1180
+ | Param | Type | Description |
1181
+ | --- | --- | --- |
1182
+ | callback | <code>forEachCallback</code> | The function to call for-each double linker |
1183
+ | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
1184
+
1185
+ <a name="DoublyLinkedList.fromArray"></a>
1186
+
1187
+ ### DoublyLinkedList.fromArray([values], [linkerClass], [classType]) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1188
+ Convert an array into a DoublyLinkedList instance, return the new instance.
1189
+
1190
+ **Kind**: static method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1191
+
1192
+ | Param | Type | Default | Description |
1193
+ | --- | --- | --- | --- |
1194
+ | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to linkers in this doubly-linked-list |
1195
+ | [linkerClass] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | The class to use for each linker |
1196
+ | [classType] | <code>IsArrayable.&lt;IsDoubleLinker&gt;</code> | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1197
+
1198
+ <a name="DoubleLinker"></a>
1199
+
1200
+ ## DoubleLinker ⇐ [<code>Linker</code>](#Linker)
1201
+ DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.
1202
+
1203
+ **Kind**: global class
1204
+ **Extends**: [<code>Linker</code>](#Linker)
1205
+
1206
+ * [DoubleLinker](#DoubleLinker) ⇐ [<code>Linker</code>](#Linker)
1207
+ * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
1208
+ * [.make(linker, [classType])](#DoubleLinker.make) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1209
+ * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
1210
+
1211
+ <a name="new_DoubleLinker_new"></a>
1212
+
1213
+ ### new DoubleLinker([nodeData])
1214
+ Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
1215
+
1216
+
1217
+ | Param | Type | Default | Description |
1218
+ | --- | --- | --- | --- |
1219
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
1220
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1221
+ | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1222
+ | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
1223
+
1224
+ <a name="DoubleLinker.make"></a>
1225
+
1226
+ ### DoubleLinker.make(linker, [classType]) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1227
+ Make a new DoubleLinker from the data given if it is not already a valid Linker.
1228
+
1229
+ **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1230
+
1231
+ | Param | Type | Default | Description |
1232
+ | --- | --- | --- | --- |
1233
+ | linker | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
1234
+ | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1235
+
1236
+ <a name="DoubleLinker.fromArray"></a>
1237
+
1238
+ ### DoubleLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
1239
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1240
+
1241
+ **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1242
+
1243
+ | Param | Type | Default | Description |
1244
+ | --- | --- | --- | --- |
1245
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1246
+ | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1247
+
1248
+ <a name="Arrayable"></a>
1249
+
1250
+ ## Arrayable
1251
+ Arrayable represents a collection stored as an array.
1252
+
1253
+ **Kind**: global class
1254
+
1255
+ * [Arrayable](#Arrayable)
1256
+ * [new Arrayable()](#new_Arrayable_new)
1257
+ * _instance_
1258
+ * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1259
+ * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1260
+ * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1261
+ * [.length](#Arrayable+length) ⇒ <code>number</code>
1262
+ * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
1263
+ * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
1264
+ * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
1265
+ * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
1266
+ * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
1267
+ * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1268
+ * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1269
+ * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
1270
+ * _static_
1271
+ * [.fromArray(values, [elementClass], [classType])](#Arrayable.fromArray) ⇒ [<code>Arrayable</code>](#Arrayable)
1272
+
1273
+ <a name="new_Arrayable_new"></a>
1274
+
1275
+ ### new Arrayable()
1276
+ Create the new Arrayable instance, configure the Arrayable class.
1277
+
1278
+ <a name="Arrayable+list"></a>
1279
+
1280
+ ### arrayable.list ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1281
+ Retrieve a copy of the innerList used.
1282
+
1283
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1284
+ <a name="Arrayable+first"></a>
1285
+
1286
+ ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
1287
+ Retrieve the first Element from the Arrayable
1288
+
1289
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1290
+ <a name="Arrayable+last"></a>
1291
+
1292
+ ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
1293
+ Retrieve the last Element from the Arrayable
1294
+
1295
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1296
+ <a name="Arrayable+length"></a>
1297
+
1298
+ ### arrayable.length ⇒ <code>number</code>
1299
+ Return the length of the list.
1300
+
1301
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1302
+ <a name="Arrayable+initialize"></a>
1303
+
1304
+ ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
1305
+ Initialize the inner list, should only run once.
1306
+
1307
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1308
+
1309
+ | Param | Type | Description |
1310
+ | --- | --- | --- |
1311
+ | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
1312
+
1313
+ <a name="Arrayable+insertAfter"></a>
1314
+
1315
+ ### arrayable.insertAfter(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1316
+ Insert a new node (or data) after a node.
1317
+
1318
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1319
+
1320
+ | Param | Type | Description |
1321
+ | --- | --- | --- |
1322
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1323
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
1324
+
1325
+ <a name="Arrayable+insertBefore"></a>
1326
+
1327
+ ### arrayable.insertBefore(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1328
+ Insert a new node (or data) before a node.
1329
+
1330
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1331
+
1332
+ | Param | Type | Description |
1333
+ | --- | --- | --- |
1334
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1335
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
1336
+
1337
+ <a name="Arrayable+append"></a>
1338
+
1339
+ ### arrayable.append(node, after) ⇒ [<code>Arrayable</code>](#Arrayable)
1340
+ Add a node (or data) after the given (or last) node in the list.
1341
+
1342
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1343
+
1344
+ | Param | Type | Description |
1345
+ | --- | --- | --- |
1346
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
1347
+ | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
1348
+
1349
+ <a name="Arrayable+prepend"></a>
1350
+
1351
+ ### arrayable.prepend(node, before) ⇒ [<code>Arrayable</code>](#Arrayable)
1352
+ Add a node (or data) before the given (or first) node in the list.
1353
+
1354
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1355
+
1356
+ | Param | Type | Description |
1357
+ | --- | --- | --- |
1358
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
1359
+ | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
1360
+
1361
+ <a name="Arrayable+remove"></a>
1362
+
1363
+ ### arrayable.remove(node) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1364
+ Remove an element from this arrayable.
1365
+
1366
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1367
+
1368
+ | Param | Type | Description |
1369
+ | --- | --- | --- |
1370
+ | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
1371
+
1372
+ <a name="Arrayable+item"></a>
1373
+
1374
+ ### arrayable.item(index) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1375
+ Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
1376
+
1377
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1378
+
1379
+ | Param | Type | Description |
1380
+ | --- | --- | --- |
1381
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
1382
+
1383
+ <a name="Arrayable+forEach"></a>
1384
+
1385
+ ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
1386
+ Be able to run forEach on this Arrayable to iterate over the elements.
1387
+
1388
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1389
+
1390
+ | Param | Type | Description |
1391
+ | --- | --- | --- |
1392
+ | callback | <code>forEachCallback</code> | The function to call for-each element |
1393
+ | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
1394
+
1395
+ <a name="Arrayable.fromArray"></a>
1396
+
1397
+ ### Arrayable.fromArray(values, [elementClass], [classType]) ⇒ [<code>Arrayable</code>](#Arrayable)
1398
+ Convert an array to an Arrayable.
1399
+
1400
+ **Kind**: static method of [<code>Arrayable</code>](#Arrayable)
1401
+
1402
+ | Param | Type | Default | Description |
1403
+ | --- | --- | --- | --- |
1404
+ | values | <code>Array</code> | | An array of values which will be converted to elements in this arrayable |
1405
+ | [elementClass] | <code>IsElement</code> | <code>ArrayElement</code> | The class to use for each element |
1406
+ | [classType] | [<code>IsArrayable.&lt;ArrayElement&gt;</code>](#ArrayElement) | <code>Arrayable</code> | Provide the type of IsArrayable to use. |
1407
+
1408
+ <a name="ArrayElement"></a>
1409
+
1410
+ ## ArrayElement
1411
+ Element represents a node in an Arrayable.
1412
+
1413
+ **Kind**: global class
1414
+
1415
+ * [ArrayElement](#ArrayElement)
1416
+ * [new ArrayElement([data])](#new_ArrayElement_new)
1417
+ * [.make(element, [classType])](#ArrayElement.make) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1418
+ * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
1419
+
1420
+ <a name="new_ArrayElement_new"></a>
1421
+
1422
+ ### new ArrayElement([data])
1423
+ Create the new Element instance, provide the data and optionally configure the type of Element.
1424
+
1425
+
1426
+ | Param | Type | Default | Description |
1427
+ | --- | --- | --- | --- |
1428
+ | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
1429
+
1430
+ <a name="ArrayElement.make"></a>
1431
+
1432
+ ### ArrayElement.make(element, [classType]) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1433
+ Make a new Element from the data given if it is not already a valid Element.
1434
+
1435
+ **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1436
+
1437
+ | Param | Type | Default | Description |
1438
+ | --- | --- | --- | --- |
1439
+ | element | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | | Return a valid ArrayElement instance from given data, or even an already valid one. |
1440
+ | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1441
+
1442
+ <a name="ArrayElement.fromArray"></a>
1443
+
1444
+ ### ArrayElement.fromArray([values], [classType]) ⇒ <code>Object</code>
1445
+ Convert an array into Element instances, return the head and tail Elements.
1446
+
1447
+ **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1448
+
1449
+ | Param | Type | Default | Description |
1450
+ | --- | --- | --- | --- |
1451
+ | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
1452
+ | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1453
+
1454
+ <a name="services"></a>
1455
+
1456
+ ## services
1457
+ List helpful functions when dealing with collections.
1458
+
1459
+ **Kind**: global constant
1460
+ <a name="recipes"></a>
1461
+
1462
+ ## recipes
1463
+ List of class declarations that can be used to specify attributes for a style of object / class.
1464
+
1465
+ **Kind**: global constant
1466
+ <a name="parseTreeNext"></a>
1467
+
1468
+ ## parseTreeNext(treeNode) <code>IsTreeNode</code> \| <code>null</code>
1469
+ Be able to parse over every node in a tree.
1470
+ 1. Start at root (get root parent)
1471
+ 2. Get first child (repeat until no children)
1472
+ 3. Check next child
1473
+ 4. Repeat 2
1474
+ 5. Repeat 3
1475
+ 6. If no next child, return to parent and repeat 3
1476
+ 7. Stop at root (next is null and parent is null
1477
+
1478
+ **Kind**: global function
1479
+
1480
+ | Param | Type | Description |
1481
+ | --- | --- | --- |
1482
+ | treeNode | <code>IsTreeNode</code> | Provide a node in a tree and get the next node (left-first approach) |
1483
+
1484
+ <a name="parseTree"></a>
1485
+
1486
+ ## parseTree(tree, callback) ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code>
1487
+ Loop over all the nodes in a tree starting from left and apply a callback for each
1488
+
1489
+ **Kind**: global function
1490
+
1491
+ | Param | Type |
1492
+ | --- | --- |
1493
+ | tree | <code>IsArrayable.&lt;IsTreeNode&gt;</code> |
1494
+ | callback | <code>forEachCallback</code> |
1495
+