collect-your-stuff 1.2.7 → 1.2.8

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 (61) hide show
  1. package/README.md +2525 -2525
  2. package/browser/collect-your-stuff.js +22766 -22761
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +36 -36
  5. package/dist/collections/arrayable/ArrayElement.js +64 -64
  6. package/dist/collections/arrayable/Arrayable.d.ts +108 -108
  7. package/dist/collections/arrayable/Arrayable.js +188 -188
  8. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +46 -46
  9. package/dist/collections/doubly-linked-list/DoubleLinker.js +69 -69
  10. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +113 -113
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +274 -269
  12. package/dist/collections/doubly-linked-list/DoublyLinkedList.min.js +1 -1
  13. package/dist/collections/linked-list/LinkedList.d.ts +109 -109
  14. package/dist/collections/linked-list/LinkedList.js +233 -233
  15. package/dist/collections/linked-list/Linker.d.ts +43 -43
  16. package/dist/collections/linked-list/Linker.js +80 -80
  17. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +135 -135
  18. package/dist/collections/linked-tree-list/LinkedTreeList.js +252 -252
  19. package/dist/collections/linked-tree-list/TreeLinker.d.ts +63 -63
  20. package/dist/collections/linked-tree-list/TreeLinker.js +79 -79
  21. package/dist/collections/queue/Queue.d.ts +63 -63
  22. package/dist/collections/queue/Queue.js +130 -130
  23. package/dist/collections/queue/Queueable.d.ts +77 -77
  24. package/dist/collections/queue/Queueable.js +141 -141
  25. package/dist/collections/stack/Stack.d.ts +63 -63
  26. package/dist/collections/stack/Stack.js +106 -106
  27. package/dist/collections/stack/Stackable.d.ts +56 -56
  28. package/dist/collections/stack/Stackable.js +83 -83
  29. package/dist/main.d.ts +40 -40
  30. package/dist/main.js +50 -50
  31. package/dist/recipes/ArrayIterator.d.ts +10 -10
  32. package/dist/recipes/ArrayIterator.js +29 -29
  33. package/dist/recipes/DoubleLinkerIterator.d.ts +9 -9
  34. package/dist/recipes/DoubleLinkerIterator.js +24 -24
  35. package/dist/recipes/IsArrayable.d.ts +105 -105
  36. package/dist/recipes/IsArrayable.js +5 -5
  37. package/dist/recipes/IsDoubleLinker.d.ts +14 -14
  38. package/dist/recipes/IsDoubleLinker.js +5 -5
  39. package/dist/recipes/IsElement.d.ts +14 -14
  40. package/dist/recipes/IsElement.js +5 -5
  41. package/dist/recipes/IsLinker.d.ts +10 -10
  42. package/dist/recipes/IsLinker.js +5 -5
  43. package/dist/recipes/IsTree.d.ts +11 -11
  44. package/dist/recipes/IsTree.js +5 -5
  45. package/dist/recipes/IsTreeNode.d.ts +29 -29
  46. package/dist/recipes/IsTreeNode.js +5 -5
  47. package/dist/recipes/LinkerIterator.d.ts +9 -9
  48. package/dist/recipes/LinkerIterator.js +24 -24
  49. package/dist/recipes/Runnable.d.ts +54 -54
  50. package/dist/recipes/Runnable.js +68 -68
  51. package/dist/recipes/TreeLinkerIterator.d.ts +9 -9
  52. package/dist/recipes/TreeLinkerIterator.js +25 -25
  53. package/dist/recipes/recipes.d.ts +15 -15
  54. package/dist/recipes/recipes.js +22 -22
  55. package/dist/services/parseTree.d.ts +9 -9
  56. package/dist/services/parseTree.js +24 -24
  57. package/dist/services/parseTreeNext.d.ts +14 -14
  58. package/dist/services/parseTreeNext.js +47 -47
  59. package/dist/services/services.d.ts +13 -13
  60. package/dist/services/services.js +22 -22
  61. package/package.json +1 -1
package/README.md CHANGED
@@ -2,2528 +2,2528 @@
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
- ## Members
70
-
71
- <dl>
72
- <dt><a href="#Stackable">Stackable</a> ⇒ <code><a href="#Stackable">Stackable</a></code></dt>
73
- <dd><p>Make a new Stackable from the data given if it is not already a valid Stackable.</p>
74
- </dd>
75
- <dt><a href="#Stack">Stack</a> ⇒ <code><a href="#Stack">Stack</a></code></dt>
76
- <dd><p>Convert an array to a Stack.</p>
77
- </dd>
78
- <dt><a href="#Queueable">Queueable</a> ⇒ <code><a href="#Queueable">Queueable</a></code></dt>
79
- <dd><p>Make a new Queueable from the data given if it is not already a valid Queueable.</p>
80
- </dd>
81
- <dt><a href="#Queue">Queue</a> ⇒ <code><a href="#Queue">Queue</a></code></dt>
82
- <dd><p>Convert an array to a Queue.</p>
83
- </dd>
84
- <dt><a href="#TreeLinker">TreeLinker</a> ⇒ <code><a href="#TreeLinker">TreeLinker</a></code></dt>
85
- <dd><p>Make a new DoubleLinker from the data given if it is not already a valid Linker.</p>
86
- </dd>
87
- <dt><a href="#LinkedTreeList">LinkedTreeList</a> ⇒ <code><a href="#LinkedTreeList">LinkedTreeList</a></code></dt>
88
- <dd><p>Convert an array into a LinkedTreeList instance, return the new instance.</p>
89
- </dd>
90
- <dt><a href="#Linker">Linker</a> ⇒ <code><a href="#Linker">Linker</a></code></dt>
91
- <dd><p>Make a new Linker from the data given if it is not already a valid Linker.</p>
92
- </dd>
93
- <dt><a href="#LinkedList">LinkedList</a> ⇒ <code><a href="#LinkedList">LinkedList</a></code></dt>
94
- <dd><p>Convert an array to a LinkedList.</p>
95
- </dd>
96
- <dt><a href="#DoublyLinkedList">DoublyLinkedList</a> ⇒ <code><a href="#DoublyLinkedList">DoublyLinkedList</a></code></dt>
97
- <dd><p>Convert an array into a DoublyLinkedList instance, return the new instance.</p>
98
- </dd>
99
- <dt><a href="#DoubleLinker">DoubleLinker</a> ⇒ <code><a href="#DoubleLinker">DoubleLinker</a></code></dt>
100
- <dd><p>Make a new DoubleLinker from the data given if it is not already a valid Linker.</p>
101
- </dd>
102
- <dt><a href="#Arrayable">Arrayable</a> ⇒ <code><a href="#Arrayable">Arrayable</a></code></dt>
103
- <dd><p>Convert an array to an Arrayable.</p>
104
- </dd>
105
- <dt><a href="#ArrayElement">ArrayElement</a> ⇒ <code><a href="#ArrayElement">ArrayElement</a></code></dt>
106
- <dd><p>Make a new Element from the data given if it is not already a valid Element.</p>
107
- </dd>
108
- </dl>
109
-
110
- ## Constants
111
-
112
- <dl>
113
- <dt><a href="#services">services</a></dt>
114
- <dd><p>List helpful functions when dealing with collections.</p>
115
- </dd>
116
- <dt><a href="#recipes">recipes</a></dt>
117
- <dd><p>List of class declarations that can be used to specify attributes for a style of object / class.</p>
118
- </dd>
119
- </dl>
120
-
121
- ## Functions
122
-
123
- <dl>
124
- <dt><a href="#parseTreeNext">parseTreeNext(treeNode)</a> ⇒ <code>IsTreeNode</code> | <code>null</code></dt>
125
- <dd><p>Be able to parse over every node in a tree.</p>
126
- <ol>
127
- <li>Start at root (get root parent)</li>
128
- <li>Get first child (repeat until no children)</li>
129
- <li>Check next child</li>
130
- <li>Repeat 2</li>
131
- <li>Repeat 3</li>
132
- <li>If no next child, return to parent and repeat 3</li>
133
- <li>Stop at root (next is null and parent is null</li>
134
- </ol>
135
- </dd>
136
- <dt><a href="#parseTree">parseTree(tree, callback)</a> ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code></dt>
137
- <dd><p>Loop over all the nodes in a tree starting from left and apply a callback for each</p>
138
- </dd>
139
- </dl>
140
-
141
- <a name="module_collect-your-stuff"></a>
142
-
143
- ## collect-your-stuff
144
- All of the collections available.
145
-
146
- **Version**: 1.0.0
147
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
148
- <a name="module_collect-your-stuff..collectYourStuff"></a>
149
-
150
- ### collect-your-stuff~collectYourStuff
151
- All methods exported from this module are encapsulated within collect-your-stuff.
152
-
153
- **Kind**: inner constant of [<code>collect-your-stuff</code>](#module_collect-your-stuff)
154
- <a name="TreeLinkerIterator"></a>
155
-
156
- ## TreeLinkerIterator
157
- Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.
158
-
159
- **Kind**: global class
160
- <a name="Runnable"></a>
161
-
162
- ## Runnable
163
- Identify a class that can be run.
164
-
165
- **Kind**: global class
166
-
167
- * [Runnable](#Runnable)
168
- * [new Runnable(data)](#new_Runnable_new)
169
- * _instance_
170
- * [.task](#Runnable+task) ⇒ <code>function</code>
171
- * [.run()](#Runnable+run) ⇒ <code>\*</code>
172
- * _static_
173
- * [.isRunnable(thing)](#Runnable.isRunnable) ⇒ <code>boolean</code>
174
-
175
- <a name="new_Runnable_new"></a>
176
-
177
- ### new Runnable(data)
178
- Instantiate a Runnable class.
179
-
180
-
181
- | Param | Type | Default |
182
- | --- | --- | --- |
183
- | data | <code>\*</code> | <code></code> |
184
-
185
- <a name="Runnable+task"></a>
186
-
187
- ### runnable.task ⇒ <code>function</code>
188
- Retrieve the data which should be formed as a task.
189
-
190
- **Kind**: instance property of [<code>Runnable</code>](#Runnable)
191
- <a name="Runnable+run"></a>
192
-
193
- ### runnable.run() ⇒ <code>\*</code>
194
- Run the runnable task.
195
-
196
- **Kind**: instance method of [<code>Runnable</code>](#Runnable)
197
- <a name="Runnable.isRunnable"></a>
198
-
199
- ### Runnable.isRunnable(thing) ⇒ <code>boolean</code>
200
- Check if a given thing is Runnable
201
-
202
- **Kind**: static method of [<code>Runnable</code>](#Runnable)
203
-
204
- | Param | Type |
205
- | --- | --- |
206
- | thing | <code>\*</code> |
207
-
208
- <a name="LinkerIterator"></a>
209
-
210
- ## LinkerIterator
211
- Class LinkerIterator returns the next value when using linkers of linked type lists.
212
-
213
- **Kind**: global class
214
- <a name="DoubleLinkerIterator"></a>
215
-
216
- ## DoubleLinkerIterator
217
- Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
218
-
219
- **Kind**: global class
220
- <a name="ArrayIterator"></a>
221
-
222
- ## ArrayIterator
223
- Class ArrayIterator returns the next value when using elements of array type list.
224
-
225
- **Kind**: global class
226
- <a name="Stackable"></a>
227
-
228
- ## Stackable ⇐ [<code>Linker</code>](#Linker)
229
- Stackable represents a runnable entry in stack.
230
-
231
- **Kind**: global class
232
- **Extends**: [<code>Linker</code>](#Linker)
233
-
234
- * [Stackable](#Stackable) ⇐ [<code>Linker</code>](#Linker)
235
- * [new Stackable([stackData])](#new_Stackable_new)
236
- * _instance_
237
- * [.task](#Stackable+task) ⇒ <code>\*</code>
238
- * [.run()](#Stackable+run) ⇒ <code>\*</code>
239
- * _static_
240
- * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
241
-
242
- <a name="new_Stackable_new"></a>
243
-
244
- ### new Stackable([stackData])
245
- Create a stackable item that can be used in a stack.
246
-
247
-
248
- | Param | Type | Default | Description |
249
- | --- | --- | --- | --- |
250
- | [stackData] | <code>Object</code> | <code>{}</code> | |
251
- | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
252
- | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
253
- | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
254
-
255
- <a name="Stackable+task"></a>
256
-
257
- ### stackable.task ⇒ <code>\*</code>
258
- Retrieve the data which should be formed as a task.
259
-
260
- **Kind**: instance property of [<code>Stackable</code>](#Stackable)
261
- <a name="Stackable+run"></a>
262
-
263
- ### stackable.run() ⇒ <code>\*</code>
264
- Run the stacked task.
265
-
266
- **Kind**: instance method of [<code>Stackable</code>](#Stackable)
267
- <a name="Stackable.fromArray"></a>
268
-
269
- ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
270
- Convert an array into Stackable instances, return the head and tail Stackables.
271
-
272
- **Kind**: static method of [<code>Stackable</code>](#Stackable)
273
-
274
- | Param | Type | Default | Description |
275
- | --- | --- | --- | --- |
276
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
277
- | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
278
-
279
- <a name="Stack"></a>
280
-
281
- ## Stack
282
- Store a collection of items which can only be inserted and removed from the top.
283
-
284
- **Kind**: global class
285
-
286
- * [Stack](#Stack)
287
- * [new Stack(stackedList, listClass, stackableClass)](#new_Stack_new)
288
- * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
289
- * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
290
- * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
291
- * [.push(stackable)](#Stack+push)
292
- * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
293
- * [.size()](#Stack+size) ⇒ <code>number</code>
294
-
295
- <a name="new_Stack_new"></a>
296
-
297
- ### new Stack(stackedList, listClass, stackableClass)
298
- Instantiate the state with the starter stacked list.
299
-
300
-
301
- | Param | Type | Default |
302
- | --- | --- | --- |
303
- | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> |
304
- | listClass | <code>IsArrayable</code> | |
305
- | stackableClass | [<code>Stackable</code>](#Stackable) | |
306
-
307
- <a name="Stack+empty"></a>
308
-
309
- ### stack.empty() ⇒ <code>boolean</code>
310
- Return true if the stack is empty (there are no tasks in the stacked list)
311
-
312
- **Kind**: instance method of [<code>Stack</code>](#Stack)
313
- <a name="Stack+top"></a>
314
-
315
- ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
316
- Take a look at the next stacked task
317
-
318
- **Kind**: instance method of [<code>Stack</code>](#Stack)
319
- <a name="Stack+pop"></a>
320
-
321
- ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
322
- Remove the next stacked task and return it.
323
-
324
- **Kind**: instance method of [<code>Stack</code>](#Stack)
325
- <a name="Stack+push"></a>
326
-
327
- ### stack.push(stackable)
328
- Push a stackable task to the top of the stack.
329
-
330
- **Kind**: instance method of [<code>Stack</code>](#Stack)
331
-
332
- | Param | Type | Description |
333
- | --- | --- | --- |
334
- | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
335
-
336
- <a name="Stack+remove"></a>
337
-
338
- ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
339
- Remove the next stacked task and return it.
340
-
341
- **Kind**: instance method of [<code>Stack</code>](#Stack)
342
- <a name="Stack+size"></a>
343
-
344
- ### stack.size() ⇒ <code>number</code>
345
- Get the size of the current stack.
346
-
347
- **Kind**: instance method of [<code>Stack</code>](#Stack)
348
- <a name="Queueable"></a>
349
-
350
- ## Queueable ⇐ [<code>Linker</code>](#Linker)
351
- Queueable represents a runnable entry in a queue.
352
-
353
- **Kind**: global class
354
- **Extends**: [<code>Linker</code>](#Linker)
355
-
356
- * [Queueable](#Queueable) ⇐ [<code>Linker</code>](#Linker)
357
- * [new Queueable([queueableData])](#new_Queueable_new)
358
- * _instance_
359
- * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
360
- * [.task](#Queueable+task) ⇒ <code>\*</code>
361
- * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
362
- * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
363
- * _static_
364
- * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
365
-
366
- <a name="new_Queueable_new"></a>
367
-
368
- ### new Queueable([queueableData])
369
- Create a queueable item that can be used in a queue.
370
-
371
-
372
- | Param | Type | Default | Description |
373
- | --- | --- | --- | --- |
374
- | [queueableData] | <code>Object</code> | <code>{}</code> | |
375
- | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
376
- | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
377
- | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
378
-
379
- <a name="Queueable+isReady"></a>
380
-
381
- ### queueable.isReady ⇒ <code>boolean</code>
382
- Check ready state.
383
-
384
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
385
- <a name="Queueable+task"></a>
386
-
387
- ### queueable.task ⇒ <code>\*</code>
388
- Retrieve the data which should be formed as a task.
389
-
390
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
391
- <a name="Queueable+markCompleted"></a>
392
-
393
- ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
394
- Set this queueable as completed.
395
-
396
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
397
-
398
- | Param | Type | Default | Description |
399
- | --- | --- | --- | --- |
400
- | completeResponse | <code>Object</code> | | |
401
- | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
402
- | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
403
- | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
404
-
405
- <a name="Queueable+run"></a>
406
-
407
- ### queueable.run() ⇒ <code>completeResponse</code>
408
- Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
409
-
410
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
411
- <a name="Queueable.fromArray"></a>
412
-
413
- ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
414
- Convert an array into Queueable instances, return the head and tail Queueables.
415
-
416
- **Kind**: static method of [<code>Queueable</code>](#Queueable)
417
-
418
- | Param | Type | Default | Description |
419
- | --- | --- | --- | --- |
420
- | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
421
- | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
422
-
423
- <a name="Queue"></a>
424
-
425
- ## Queue
426
- Maintain a series of queued items.
427
-
428
- **Kind**: global class
429
-
430
- * [Queue](#Queue)
431
- * [new Queue(queuedList, listClass, queueableClass)](#new_Queue_new)
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
-
439
- <a name="new_Queue_new"></a>
440
-
441
- ### new Queue(queuedList, listClass, queueableClass)
442
- Instantiate the queue with the given queue list.
443
-
444
-
445
- | Param | Type | Default | Description |
446
- | --- | --- | --- | --- |
447
- | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> | Give the list of queueables to start in this queue. |
448
- | listClass | <code>IsArrayable</code> | | |
449
- | queueableClass | [<code>Queueable</code>](#Queueable) | | |
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="TreeLinker"></a>
493
-
494
- ## TreeLinker ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
495
- TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.
496
-
497
- **Kind**: global class
498
- **Extends**: [<code>DoubleLinker</code>](#DoubleLinker)
499
-
500
- * [TreeLinker](#TreeLinker) ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
501
- * [new TreeLinker([settings], listClass)](#new_TreeLinker_new)
502
- * _instance_
503
- * [.childrenFromArray(children, listClass)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
504
- * _static_
505
- * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
506
-
507
- <a name="new_TreeLinker_new"></a>
508
-
509
- ### new TreeLinker([settings], listClass)
510
- Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
511
-
512
-
513
- | Param | Type | Default | Description |
514
- | --- | --- | --- | --- |
515
- | [settings] | <code>Object</code> | <code>{}</code> | |
516
- | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
517
- | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
518
- | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
519
- | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
520
- | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
521
- | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
522
-
523
- <a name="TreeLinker+childrenFromArray"></a>
524
-
525
- ### treeLinker.childrenFromArray(children, listClass) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
526
- Create the children for this tree from an array.
527
-
528
- **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
529
-
530
- | Param | Type | Default | Description |
531
- | --- | --- | --- | --- |
532
- | children | <code>Array</code> \| <code>null</code> | <code></code> | Provide an array of data / linker references to be children of this tree node. |
533
- | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
534
-
535
- <a name="TreeLinker.fromArray"></a>
536
-
537
- ### TreeLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
538
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
539
-
540
- **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
541
-
542
- | Param | Type | Default | Description |
543
- | --- | --- | --- | --- |
544
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
545
- | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
546
-
547
- <a name="LinkedTreeList"></a>
548
-
549
- ## LinkedTreeList ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
550
- LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.
551
-
552
- **Kind**: global class
553
- **Extends**: [<code>DoublyLinkedList</code>](#DoublyLinkedList)
554
-
555
- * [LinkedTreeList](#LinkedTreeList) ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
556
- * [new LinkedTreeList()](#new_LinkedTreeList_new)
557
- * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
558
- * [.first](#LinkedTreeList+first) ⇒ [<code>TreeLinker</code>](#TreeLinker)
559
- * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
560
- * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
561
- * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
562
- * [.parent](#LinkedTreeList+parent)
563
- * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
564
- * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
565
- * [.setChildren(item, children)](#LinkedTreeList+setChildren)
566
- * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
567
- * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
568
- * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
569
- * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
570
- * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
571
- * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
572
- * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
573
- * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
574
-
575
- <a name="new_LinkedTreeList_new"></a>
576
-
577
- ### new LinkedTreeList()
578
- Create the new LinkedTreeList instance, configure the list class.
579
-
580
- <a name="LinkedTreeList+list"></a>
581
-
582
- ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
583
- Retrieve a copy of the innerList used.
584
-
585
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
586
- **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
587
- <a name="LinkedTreeList+first"></a>
588
-
589
- ### linkedTreeList.first ⇒ [<code>TreeLinker</code>](#TreeLinker)
590
- Retrieve the first TreeLinker in the list.
591
-
592
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
593
- **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
594
- <a name="LinkedTreeList+last"></a>
595
-
596
- ### linkedTreeList.last ⇒ [<code>TreeLinker</code>](#TreeLinker)
597
- Retrieve the last TreeLinker in the list.
598
-
599
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
600
- **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
601
- <a name="LinkedTreeList+length"></a>
602
-
603
- ### linkedTreeList.length ⇒ <code>number</code>
604
- Return the length of the list.
605
-
606
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
607
- **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
608
- <a name="LinkedTreeList+parent"></a>
609
-
610
- ### linkedTreeList.parent ⇒ [<code>TreeLinker</code>](#TreeLinker)
611
- Get the parent of this tree list.
612
-
613
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
614
- <a name="LinkedTreeList+parent"></a>
615
-
616
- ### linkedTreeList.parent
617
- Set the parent of this tree list
618
-
619
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
620
-
621
- | Param | Type | Description |
622
- | --- | --- | --- |
623
- | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
624
-
625
- <a name="LinkedTreeList+rootParent"></a>
626
-
627
- ### linkedTreeList.rootParent ⇒ [<code>TreeLinker</code>](#TreeLinker)
628
- Return the root parent of the entire tree.
629
-
630
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
631
- <a name="LinkedTreeList+initialize"></a>
632
-
633
- ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
634
- Initialize the inner list, should only run once.
635
-
636
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
637
- **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
638
-
639
- | Param | Type | Description |
640
- | --- | --- | --- |
641
- | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
642
-
643
- <a name="LinkedTreeList+setChildren"></a>
644
-
645
- ### linkedTreeList.setChildren(item, children)
646
- Set the children on a parent item.
647
-
648
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
649
-
650
- | Param | Type | Default | Description |
651
- | --- | --- | --- | --- |
652
- | item | [<code>TreeLinker</code>](#TreeLinker) | | The TreeLinker node that will be the parent of the children |
653
- | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The LinkedTreeList which has the child nodes to use |
654
-
655
- <a name="LinkedTreeList+insertAfter"></a>
656
-
657
- ### linkedTreeList.insertAfter(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
658
- Insert a new node (or data) after a node.
659
-
660
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
661
- **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
662
-
663
- | Param | Type | Description |
664
- | --- | --- | --- |
665
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
666
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
667
-
668
- <a name="LinkedTreeList+insertBefore"></a>
669
-
670
- ### linkedTreeList.insertBefore(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
671
- Insert a new node (or data) before a node.
672
-
673
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
674
- **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
675
-
676
- | Param | Type | Description |
677
- | --- | --- | --- |
678
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
679
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
680
-
681
- <a name="LinkedTreeList+append"></a>
682
-
683
- ### linkedTreeList.append(node, after) ⇒ [<code>TreeLinker</code>](#TreeLinker)
684
- Add a node (or data) after the given (or last) node in the list.
685
-
686
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
687
- **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
688
-
689
- | Param | Type | Description |
690
- | --- | --- | --- |
691
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
692
- | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
693
-
694
- <a name="LinkedTreeList+prepend"></a>
695
-
696
- ### linkedTreeList.prepend(node, before) ⇒ [<code>TreeLinker</code>](#TreeLinker)
697
- Add a node (or data) before the given (or first) node in the list.
698
-
699
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
700
- **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
701
-
702
- | Param | Type | Description |
703
- | --- | --- | --- |
704
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
705
- | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
706
-
707
- <a name="LinkedTreeList+remove"></a>
708
-
709
- ### linkedTreeList.remove(node) ⇒ [<code>TreeLinker</code>](#TreeLinker)
710
- Remove a linker from this linked list.
711
-
712
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
713
- **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
714
-
715
- | Param | Type | Description |
716
- | --- | --- | --- |
717
- | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
718
-
719
- <a name="LinkedTreeList+reset"></a>
720
-
721
- ### linkedTreeList.reset() ⇒ [<code>TreeLinker</code>](#TreeLinker)
722
- Refresh all references and return head reference.
723
-
724
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
725
- **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
726
- <a name="LinkedTreeList+item"></a>
727
-
728
- ### linkedTreeList.item(index) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
729
- Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
730
-
731
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
732
- **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
733
-
734
- | Param | Type | Description |
735
- | --- | --- | --- |
736
- | index | <code>number</code> | The integer number for retrieving a node by position. |
737
-
738
- <a name="LinkedTreeList+forEach"></a>
739
-
740
- ### linkedTreeList.forEach(callback, thisArg)
741
- Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
742
-
743
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
744
- **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
745
-
746
- | Param | Type | Description |
747
- | --- | --- | --- |
748
- | callback | <code>forEachCallback</code> | The function to call for-each tree node |
749
- | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
750
-
751
- <a name="Linker"></a>
752
-
753
- ## Linker ⇐ [<code>ArrayElement</code>](#ArrayElement)
754
- Linker represents a node in a LinkedList.
755
-
756
- **Kind**: global class
757
- **Extends**: [<code>ArrayElement</code>](#ArrayElement)
758
-
759
- * [Linker](#Linker) ⇐ [<code>ArrayElement</code>](#ArrayElement)
760
- * [new Linker([nodeData])](#new_Linker_new)
761
- * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
762
-
763
- <a name="new_Linker_new"></a>
764
-
765
- ### new Linker([nodeData])
766
- Create the new Linker instance, provide the data and optionally give the next Linker.
767
-
768
-
769
- | Param | Type | Default | Description |
770
- | --- | --- | --- | --- |
771
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
772
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
773
- | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
774
-
775
- <a name="Linker.fromArray"></a>
776
-
777
- ### Linker.fromArray([values], [classType]) ⇒ <code>Object</code>
778
- Convert an array into Linker instances, return the head and tail Linkers.
779
-
780
- **Kind**: static method of [<code>Linker</code>](#Linker)
781
-
782
- | Param | Type | Default | Description |
783
- | --- | --- | --- | --- |
784
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
785
- | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
786
-
787
- <a name="LinkedList"></a>
788
-
789
- ## LinkedList ⇐ [<code>Arrayable</code>](#Arrayable)
790
- LinkedList represents a collection stored as a LinkedList with next references.
791
-
792
- **Kind**: global class
793
- **Extends**: [<code>Arrayable</code>](#Arrayable)
794
-
795
- * [LinkedList](#LinkedList) ⇐ [<code>Arrayable</code>](#Arrayable)
796
- * [new LinkedList()](#new_LinkedList_new)
797
- * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
798
- * [.first](#LinkedList+first) ⇒ [<code>Linker</code>](#Linker)
799
- * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
800
- * [.length](#LinkedList+length) ⇒ <code>number</code>
801
- * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
802
- * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
803
- * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
804
- * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
805
- * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
806
- * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
807
- * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
808
- * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
809
-
810
- <a name="new_LinkedList_new"></a>
811
-
812
- ### new LinkedList()
813
- Create the new LinkedList instance.
814
-
815
- <a name="LinkedList+list"></a>
816
-
817
- ### linkedList.list ⇒ [<code>Linker</code>](#Linker)
818
- Retrieve a copy of the innerList used.
819
-
820
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
821
- **Overrides**: [<code>list</code>](#Arrayable+list)
822
- <a name="LinkedList+first"></a>
823
-
824
- ### linkedList.first ⇒ [<code>Linker</code>](#Linker)
825
- Retrieve the first Linker in the list.
826
-
827
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
828
- **Overrides**: [<code>first</code>](#Arrayable+first)
829
- <a name="LinkedList+last"></a>
830
-
831
- ### linkedList.last ⇒ [<code>Linker</code>](#Linker)
832
- Retrieve the last Linker in the list.
833
-
834
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
835
- **Overrides**: [<code>last</code>](#Arrayable+last)
836
- <a name="LinkedList+length"></a>
837
-
838
- ### linkedList.length ⇒ <code>number</code>
839
- Return the length of the list.
840
-
841
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
842
- **Overrides**: [<code>length</code>](#Arrayable+length)
843
- <a name="LinkedList+initialize"></a>
844
-
845
- ### linkedList.initialize(initialList) ⇒ [<code>LinkedList</code>](#LinkedList)
846
- Initialize the inner list, should only run once.
847
-
848
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
849
- **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
850
-
851
- | Param | Type | Description |
852
- | --- | --- | --- |
853
- | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
854
-
855
- <a name="LinkedList+insertAfter"></a>
856
-
857
- ### linkedList.insertAfter(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
858
- Insert a new node (or data) after a node.
859
-
860
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
861
- **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
862
-
863
- | Param | Type | Description |
864
- | --- | --- | --- |
865
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
866
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
867
-
868
- <a name="LinkedList+insertBefore"></a>
869
-
870
- ### linkedList.insertBefore(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
871
- Insert a new node (or data) before a node.
872
-
873
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
874
- **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
875
-
876
- | Param | Type | Description |
877
- | --- | --- | --- |
878
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
879
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
880
-
881
- <a name="LinkedList+append"></a>
882
-
883
- ### linkedList.append(node, after) ⇒ [<code>Linker</code>](#Linker)
884
- Add a node (or data) after the given (or last) node in the list.
885
-
886
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
887
- **Overrides**: [<code>append</code>](#Arrayable+append)
888
-
889
- | Param | Type | Description |
890
- | --- | --- | --- |
891
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
892
- | after | [<code>Linker</code>](#Linker) | The existing last node |
893
-
894
- <a name="LinkedList+prepend"></a>
895
-
896
- ### linkedList.prepend(node, before) ⇒ [<code>Linker</code>](#Linker)
897
- Add a node (or data) before the given (or first) node in the list.
898
-
899
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
900
- **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
901
-
902
- | Param | Type | Description |
903
- | --- | --- | --- |
904
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
905
- | before | [<code>Linker</code>](#Linker) | The existing first node |
906
-
907
- <a name="LinkedList+remove"></a>
908
-
909
- ### linkedList.remove(node) ⇒ [<code>Linker</code>](#Linker)
910
- Remove a linker from this linked list.
911
-
912
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
913
- **Overrides**: [<code>remove</code>](#Arrayable+remove)
914
-
915
- | Param | Type | Description |
916
- | --- | --- | --- |
917
- | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
918
-
919
- <a name="LinkedList+item"></a>
920
-
921
- ### linkedList.item(index) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
922
- Retrieve a Linker item from this list by numeric index, otherwise return null.
923
-
924
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
925
- **Overrides**: [<code>item</code>](#Arrayable+item)
926
-
927
- | Param | Type | Description |
928
- | --- | --- | --- |
929
- | index | <code>number</code> | The integer number for retrieving a node by position. |
930
-
931
- <a name="LinkedList+forEach"></a>
932
-
933
- ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
934
- Be able to run forEach on this LinkedList to iterate over the linkers.
935
-
936
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
937
- **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
938
-
939
- | Param | Type | Description |
940
- | --- | --- | --- |
941
- | callback | <code>forEachCallback</code> | The function to call for-each linker |
942
- | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
943
-
944
- <a name="DoublyLinkedList"></a>
945
-
946
- ## DoublyLinkedList ⇐ [<code>LinkedList</code>](#LinkedList)
947
- DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.
948
-
949
- **Kind**: global class
950
- **Extends**: [<code>LinkedList</code>](#LinkedList)
951
-
952
- * [DoublyLinkedList](#DoublyLinkedList) ⇐ [<code>LinkedList</code>](#LinkedList)
953
- * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
954
- * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
955
- * [.first](#DoublyLinkedList+first) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
956
- * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
957
- * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
958
- * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
959
- * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
960
- * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
961
- * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
962
- * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
963
- * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
964
- * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
965
- * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
966
- * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
967
-
968
- <a name="new_DoublyLinkedList_new"></a>
969
-
970
- ### new DoublyLinkedList()
971
- Create the new DoublyLinkedList instance.
972
-
973
- <a name="DoublyLinkedList+list"></a>
974
-
975
- ### doublyLinkedList.list ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
976
- Retrieve a copy of the innerList used.
977
-
978
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
979
- **Overrides**: [<code>list</code>](#LinkedList+list)
980
- <a name="DoublyLinkedList+first"></a>
981
-
982
- ### doublyLinkedList.first ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
983
- Retrieve the first DoubleLinker in the list.
984
-
985
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
986
- **Overrides**: [<code>first</code>](#LinkedList+first)
987
- <a name="DoublyLinkedList+last"></a>
988
-
989
- ### doublyLinkedList.last ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
990
- Retrieve the last DoubleLinker in the list.
991
-
992
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
993
- **Overrides**: [<code>last</code>](#LinkedList+last)
994
- <a name="DoublyLinkedList+length"></a>
995
-
996
- ### doublyLinkedList.length ⇒ <code>number</code>
997
- Return the length of the list.
998
-
999
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1000
- **Overrides**: [<code>length</code>](#LinkedList+length)
1001
- <a name="DoublyLinkedList+initialize"></a>
1002
-
1003
- ### doublyLinkedList.initialize(initialList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1004
- Initialize the inner list, should only run once.
1005
-
1006
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1007
- **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
1008
-
1009
- | Param | Type | Description |
1010
- | --- | --- | --- |
1011
- | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
1012
-
1013
- <a name="DoublyLinkedList+insertAfter"></a>
1014
-
1015
- ### doublyLinkedList.insertAfter(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1016
- Insert a new node (or data) after a node.
1017
-
1018
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1019
- **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
1020
-
1021
- | Param | Type | Description |
1022
- | --- | --- | --- |
1023
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1024
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
1025
-
1026
- <a name="DoublyLinkedList+insertBefore"></a>
1027
-
1028
- ### doublyLinkedList.insertBefore(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1029
- Insert a new node (or data) before a node.
1030
-
1031
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1032
- **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
1033
-
1034
- | Param | Type | Description |
1035
- | --- | --- | --- |
1036
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1037
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
1038
-
1039
- <a name="DoublyLinkedList+append"></a>
1040
-
1041
- ### doublyLinkedList.append(node, after) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1042
- Add a node (or data) after the given (or last) node in the list.
1043
-
1044
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1045
- **Overrides**: [<code>append</code>](#LinkedList+append)
1046
-
1047
- | Param | Type | Description |
1048
- | --- | --- | --- |
1049
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
1050
- | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
1051
-
1052
- <a name="DoublyLinkedList+prepend"></a>
1053
-
1054
- ### doublyLinkedList.prepend(node, before) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1055
- Add a node (or data) before the given (or first) node in the list.
1056
-
1057
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1058
- **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
1059
-
1060
- | Param | Type | Description |
1061
- | --- | --- | --- |
1062
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
1063
- | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
1064
-
1065
- <a name="DoublyLinkedList+remove"></a>
1066
-
1067
- ### doublyLinkedList.remove(node) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1068
- Remove a linker from this linked list.
1069
-
1070
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1071
- **Overrides**: [<code>remove</code>](#LinkedList+remove)
1072
-
1073
- | Param | Type | Description |
1074
- | --- | --- | --- |
1075
- | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
1076
-
1077
- <a name="DoublyLinkedList+reset"></a>
1078
-
1079
- ### doublyLinkedList.reset() ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1080
- Refresh all references and return head reference.
1081
-
1082
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1083
- <a name="DoublyLinkedList+item"></a>
1084
-
1085
- ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1086
- Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
1087
-
1088
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1089
- **Overrides**: [<code>item</code>](#LinkedList+item)
1090
-
1091
- | Param | Type | Description |
1092
- | --- | --- | --- |
1093
- | index | <code>number</code> | The integer number for retrieving a node by position. |
1094
-
1095
- <a name="DoublyLinkedList+forEach"></a>
1096
-
1097
- ### doublyLinkedList.forEach(callback, thisArg)
1098
- Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
1099
-
1100
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1101
- **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
1102
-
1103
- | Param | Type | Description |
1104
- | --- | --- | --- |
1105
- | callback | <code>forEachCallback</code> | The function to call for-each double linker |
1106
- | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
1107
-
1108
- <a name="DoubleLinker"></a>
1109
-
1110
- ## DoubleLinker ⇐ [<code>Linker</code>](#Linker)
1111
- DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.
1112
-
1113
- **Kind**: global class
1114
- **Extends**: [<code>Linker</code>](#Linker)
1115
-
1116
- * [DoubleLinker](#DoubleLinker) ⇐ [<code>Linker</code>](#Linker)
1117
- * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
1118
- * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
1119
-
1120
- <a name="new_DoubleLinker_new"></a>
1121
-
1122
- ### new DoubleLinker([nodeData])
1123
- Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
1124
-
1125
-
1126
- | Param | Type | Default | Description |
1127
- | --- | --- | --- | --- |
1128
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
1129
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1130
- | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1131
- | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
1132
-
1133
- <a name="DoubleLinker.fromArray"></a>
1134
-
1135
- ### DoubleLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
1136
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1137
-
1138
- **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1139
-
1140
- | Param | Type | Default | Description |
1141
- | --- | --- | --- | --- |
1142
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1143
- | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1144
-
1145
- <a name="Arrayable"></a>
1146
-
1147
- ## Arrayable
1148
- Arrayable represents a collection stored as an array.
1149
-
1150
- **Kind**: global class
1151
-
1152
- * [Arrayable](#Arrayable)
1153
- * [new Arrayable()](#new_Arrayable_new)
1154
- * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1155
- * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1156
- * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1157
- * [.length](#Arrayable+length) ⇒ <code>number</code>
1158
- * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
1159
- * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
1160
- * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
1161
- * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
1162
- * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
1163
- * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1164
- * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1165
- * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
1166
-
1167
- <a name="new_Arrayable_new"></a>
1168
-
1169
- ### new Arrayable()
1170
- Create the new Arrayable instance, configure the Arrayable class.
1171
-
1172
- <a name="Arrayable+list"></a>
1173
-
1174
- ### arrayable.list ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1175
- Retrieve a copy of the innerList used.
1176
-
1177
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1178
- <a name="Arrayable+first"></a>
1179
-
1180
- ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
1181
- Retrieve the first Element from the Arrayable
1182
-
1183
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1184
- <a name="Arrayable+last"></a>
1185
-
1186
- ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
1187
- Retrieve the last Element from the Arrayable
1188
-
1189
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1190
- <a name="Arrayable+length"></a>
1191
-
1192
- ### arrayable.length ⇒ <code>number</code>
1193
- Return the length of the list.
1194
-
1195
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1196
- <a name="Arrayable+initialize"></a>
1197
-
1198
- ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
1199
- Initialize the inner list, should only run once.
1200
-
1201
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1202
-
1203
- | Param | Type | Description |
1204
- | --- | --- | --- |
1205
- | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
1206
-
1207
- <a name="Arrayable+insertAfter"></a>
1208
-
1209
- ### arrayable.insertAfter(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1210
- Insert a new node (or data) after a node.
1211
-
1212
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1213
-
1214
- | Param | Type | Description |
1215
- | --- | --- | --- |
1216
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1217
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
1218
-
1219
- <a name="Arrayable+insertBefore"></a>
1220
-
1221
- ### arrayable.insertBefore(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1222
- Insert a new node (or data) before a node.
1223
-
1224
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1225
-
1226
- | Param | Type | Description |
1227
- | --- | --- | --- |
1228
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1229
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
1230
-
1231
- <a name="Arrayable+append"></a>
1232
-
1233
- ### arrayable.append(node, after) ⇒ [<code>Arrayable</code>](#Arrayable)
1234
- Add a node (or data) after the given (or last) node in the list.
1235
-
1236
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1237
-
1238
- | Param | Type | Description |
1239
- | --- | --- | --- |
1240
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
1241
- | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
1242
-
1243
- <a name="Arrayable+prepend"></a>
1244
-
1245
- ### arrayable.prepend(node, before) ⇒ [<code>Arrayable</code>](#Arrayable)
1246
- Add a node (or data) before the given (or first) node in the list.
1247
-
1248
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1249
-
1250
- | Param | Type | Description |
1251
- | --- | --- | --- |
1252
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
1253
- | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
1254
-
1255
- <a name="Arrayable+remove"></a>
1256
-
1257
- ### arrayable.remove(node) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1258
- Remove an element from this arrayable.
1259
-
1260
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1261
-
1262
- | Param | Type | Description |
1263
- | --- | --- | --- |
1264
- | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
1265
-
1266
- <a name="Arrayable+item"></a>
1267
-
1268
- ### arrayable.item(index) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1269
- Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
1270
-
1271
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1272
-
1273
- | Param | Type | Description |
1274
- | --- | --- | --- |
1275
- | index | <code>number</code> | The integer number for retrieving a node by position. |
1276
-
1277
- <a name="Arrayable+forEach"></a>
1278
-
1279
- ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
1280
- Be able to run forEach on this Arrayable to iterate over the elements.
1281
-
1282
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1283
-
1284
- | Param | Type | Description |
1285
- | --- | --- | --- |
1286
- | callback | <code>forEachCallback</code> | The function to call for-each element |
1287
- | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
1288
-
1289
- <a name="ArrayElement"></a>
1290
-
1291
- ## ArrayElement
1292
- Element represents a node in an Arrayable.
1293
-
1294
- **Kind**: global class
1295
-
1296
- * [ArrayElement](#ArrayElement)
1297
- * [new ArrayElement([data])](#new_ArrayElement_new)
1298
- * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
1299
-
1300
- <a name="new_ArrayElement_new"></a>
1301
-
1302
- ### new ArrayElement([data])
1303
- Create the new Element instance, provide the data and optionally configure the type of Element.
1304
-
1305
-
1306
- | Param | Type | Default | Description |
1307
- | --- | --- | --- | --- |
1308
- | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
1309
-
1310
- <a name="ArrayElement.fromArray"></a>
1311
-
1312
- ### ArrayElement.fromArray([values], [classType]) ⇒ <code>Object</code>
1313
- Convert an array into Element instances, return the head and tail Elements.
1314
-
1315
- **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1316
-
1317
- | Param | Type | Default | Description |
1318
- | --- | --- | --- | --- |
1319
- | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
1320
- | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1321
-
1322
- <a name="Stackable"></a>
1323
-
1324
- ## Stackable ⇒ [<code>Stackable</code>](#Stackable)
1325
- Make a new Stackable from the data given if it is not already a valid Stackable.
1326
-
1327
- **Kind**: global variable
1328
-
1329
- | Param | Type | Default | Description |
1330
- | --- | --- | --- | --- |
1331
- | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | | Return a valid Stackable instance from given data, or even an already valid one. |
1332
- | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
1333
-
1334
-
1335
- * [Stackable](#Stackable) ⇒ [<code>Stackable</code>](#Stackable)
1336
- * [new Stackable([stackData])](#new_Stackable_new)
1337
- * _instance_
1338
- * [.task](#Stackable+task) ⇒ <code>\*</code>
1339
- * [.run()](#Stackable+run) ⇒ <code>\*</code>
1340
- * _static_
1341
- * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
1342
-
1343
- <a name="new_Stackable_new"></a>
1344
-
1345
- ### new Stackable([stackData])
1346
- Create a stackable item that can be used in a stack.
1347
-
1348
-
1349
- | Param | Type | Default | Description |
1350
- | --- | --- | --- | --- |
1351
- | [stackData] | <code>Object</code> | <code>{}</code> | |
1352
- | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
1353
- | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
1354
- | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
1355
-
1356
- <a name="Stackable+task"></a>
1357
-
1358
- ### stackable.task ⇒ <code>\*</code>
1359
- Retrieve the data which should be formed as a task.
1360
-
1361
- **Kind**: instance property of [<code>Stackable</code>](#Stackable)
1362
- <a name="Stackable+run"></a>
1363
-
1364
- ### stackable.run() ⇒ <code>\*</code>
1365
- Run the stacked task.
1366
-
1367
- **Kind**: instance method of [<code>Stackable</code>](#Stackable)
1368
- <a name="Stackable.fromArray"></a>
1369
-
1370
- ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
1371
- Convert an array into Stackable instances, return the head and tail Stackables.
1372
-
1373
- **Kind**: static method of [<code>Stackable</code>](#Stackable)
1374
-
1375
- | Param | Type | Default | Description |
1376
- | --- | --- | --- | --- |
1377
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
1378
- | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
1379
-
1380
- <a name="Stack"></a>
1381
-
1382
- ## Stack ⇒ [<code>Stack</code>](#Stack)
1383
- Convert an array to a Stack.
1384
-
1385
- **Kind**: global variable
1386
-
1387
- | Param | Type | Description |
1388
- | --- | --- | --- |
1389
- | values | <code>Array</code> | An array of values which will be converted to stackables in this queue |
1390
- | stackableClass | [<code>Stackable</code>](#Stackable) | The class to use for each stackable |
1391
- | listClass | [<code>Stack</code>](#Stack) \| <code>Iterable</code> | The class to use to manage the stackables |
1392
-
1393
-
1394
- * [Stack](#Stack) ⇒ [<code>Stack</code>](#Stack)
1395
- * [new Stack(stackedList, listClass, stackableClass)](#new_Stack_new)
1396
- * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
1397
- * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
1398
- * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1399
- * [.push(stackable)](#Stack+push)
1400
- * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1401
- * [.size()](#Stack+size) ⇒ <code>number</code>
1402
-
1403
- <a name="new_Stack_new"></a>
1404
-
1405
- ### new Stack(stackedList, listClass, stackableClass)
1406
- Instantiate the state with the starter stacked list.
1407
-
1408
-
1409
- | Param | Type | Default |
1410
- | --- | --- | --- |
1411
- | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> |
1412
- | listClass | <code>IsArrayable</code> | |
1413
- | stackableClass | [<code>Stackable</code>](#Stackable) | |
1414
-
1415
- <a name="Stack+empty"></a>
1416
-
1417
- ### stack.empty() ⇒ <code>boolean</code>
1418
- Return true if the stack is empty (there are no tasks in the stacked list)
1419
-
1420
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1421
- <a name="Stack+top"></a>
1422
-
1423
- ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
1424
- Take a look at the next stacked task
1425
-
1426
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1427
- <a name="Stack+pop"></a>
1428
-
1429
- ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1430
- Remove the next stacked task and return it.
1431
-
1432
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1433
- <a name="Stack+push"></a>
1434
-
1435
- ### stack.push(stackable)
1436
- Push a stackable task to the top of the stack.
1437
-
1438
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1439
-
1440
- | Param | Type | Description |
1441
- | --- | --- | --- |
1442
- | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
1443
-
1444
- <a name="Stack+remove"></a>
1445
-
1446
- ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1447
- Remove the next stacked task and return it.
1448
-
1449
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1450
- <a name="Stack+size"></a>
1451
-
1452
- ### stack.size() ⇒ <code>number</code>
1453
- Get the size of the current stack.
1454
-
1455
- **Kind**: instance method of [<code>Stack</code>](#Stack)
1456
- <a name="Queueable"></a>
1457
-
1458
- ## Queueable ⇒ [<code>Queueable</code>](#Queueable)
1459
- Make a new Queueable from the data given if it is not already a valid Queueable.
1460
-
1461
- **Kind**: global variable
1462
-
1463
- | Param | Type | Default | Description |
1464
- | --- | --- | --- | --- |
1465
- | queueable | [<code>Queueable</code>](#Queueable) \| <code>\*</code> | | Return a valid Queueable instance from given data, or even an already valid one. |
1466
- | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
1467
-
1468
-
1469
- * [Queueable](#Queueable) ⇒ [<code>Queueable</code>](#Queueable)
1470
- * [new Queueable([queueableData])](#new_Queueable_new)
1471
- * _instance_
1472
- * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
1473
- * [.task](#Queueable+task) ⇒ <code>\*</code>
1474
- * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
1475
- * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
1476
- * _static_
1477
- * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
1478
-
1479
- <a name="new_Queueable_new"></a>
1480
-
1481
- ### new Queueable([queueableData])
1482
- Create a queueable item that can be used in a queue.
1483
-
1484
-
1485
- | Param | Type | Default | Description |
1486
- | --- | --- | --- | --- |
1487
- | [queueableData] | <code>Object</code> | <code>{}</code> | |
1488
- | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
1489
- | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
1490
- | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
1491
-
1492
- <a name="Queueable+isReady"></a>
1493
-
1494
- ### queueable.isReady ⇒ <code>boolean</code>
1495
- Check ready state.
1496
-
1497
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
1498
- <a name="Queueable+task"></a>
1499
-
1500
- ### queueable.task ⇒ <code>\*</code>
1501
- Retrieve the data which should be formed as a task.
1502
-
1503
- **Kind**: instance property of [<code>Queueable</code>](#Queueable)
1504
- <a name="Queueable+markCompleted"></a>
1505
-
1506
- ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
1507
- Set this queueable as completed.
1508
-
1509
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
1510
-
1511
- | Param | Type | Default | Description |
1512
- | --- | --- | --- | --- |
1513
- | completeResponse | <code>Object</code> | | |
1514
- | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
1515
- | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
1516
- | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
1517
-
1518
- <a name="Queueable+run"></a>
1519
-
1520
- ### queueable.run() ⇒ <code>completeResponse</code>
1521
- Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
1522
-
1523
- **Kind**: instance method of [<code>Queueable</code>](#Queueable)
1524
- <a name="Queueable.fromArray"></a>
1525
-
1526
- ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
1527
- Convert an array into Queueable instances, return the head and tail Queueables.
1528
-
1529
- **Kind**: static method of [<code>Queueable</code>](#Queueable)
1530
-
1531
- | Param | Type | Default | Description |
1532
- | --- | --- | --- | --- |
1533
- | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
1534
- | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
1535
-
1536
- <a name="Queue"></a>
1537
-
1538
- ## Queue ⇒ [<code>Queue</code>](#Queue)
1539
- Convert an array to a Queue.
1540
-
1541
- **Kind**: global variable
1542
-
1543
- | Param | Type | Description |
1544
- | --- | --- | --- |
1545
- | values | <code>Array</code> | An array of values which will be converted to queueables in this queue |
1546
- | queueableClass | [<code>Queueable</code>](#Queueable) | The class to use for each queueable |
1547
- | listClass | [<code>Queue</code>](#Queue) \| <code>Iterable</code> | The class to use to manage the queueables |
1548
-
1549
-
1550
- * [Queue](#Queue) ⇒ [<code>Queue</code>](#Queue)
1551
- * [new Queue(queuedList, listClass, queueableClass)](#new_Queue_new)
1552
- * [.dequeue()](#Queue+dequeue) ⇒ <code>completeResponse</code> \| <code>\*</code>
1553
- * [.empty()](#Queue+empty) ⇒ <code>boolean</code>
1554
- * [.enqueue(queueable)](#Queue+enqueue)
1555
- * [.peek()](#Queue+peek) ⇒ [<code>Queueable</code>](#Queueable)
1556
- * [.remove()](#Queue+remove) ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
1557
- * [.size()](#Queue+size) ⇒ <code>number</code>
1558
-
1559
- <a name="new_Queue_new"></a>
1560
-
1561
- ### new Queue(queuedList, listClass, queueableClass)
1562
- Instantiate the queue with the given queue list.
1563
-
1564
-
1565
- | Param | Type | Default | Description |
1566
- | --- | --- | --- | --- |
1567
- | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> | Give the list of queueables to start in this queue. |
1568
- | listClass | <code>IsArrayable</code> | | |
1569
- | queueableClass | [<code>Queueable</code>](#Queueable) | | |
1570
-
1571
- <a name="Queue+dequeue"></a>
1572
-
1573
- ### queue.dequeue() ⇒ <code>completeResponse</code> \| <code>\*</code>
1574
- Take a queued task from the front of the queue and run it if ready.
1575
-
1576
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1577
- <a name="Queue+empty"></a>
1578
-
1579
- ### queue.empty() ⇒ <code>boolean</code>
1580
- Return true if the queue is empty (there are no tasks in the queue list)
1581
-
1582
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1583
- <a name="Queue+enqueue"></a>
1584
-
1585
- ### queue.enqueue(queueable)
1586
- Add a queued task to the end of the queue
1587
-
1588
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1589
-
1590
- | Param | Type | Description |
1591
- | --- | --- | --- |
1592
- | queueable | [<code>Queueable</code>](#Queueable) | Add a new queueable to the end of the queue |
1593
-
1594
- <a name="Queue+peek"></a>
1595
-
1596
- ### queue.peek() ⇒ [<code>Queueable</code>](#Queueable)
1597
- Take a look at the next queued task
1598
-
1599
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1600
- <a name="Queue+remove"></a>
1601
-
1602
- ### queue.remove() ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
1603
- Remove the next queued item and return it.
1604
-
1605
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1606
- <a name="Queue+size"></a>
1607
-
1608
- ### queue.size() ⇒ <code>number</code>
1609
- Get the length of the current queue.
1610
-
1611
- **Kind**: instance method of [<code>Queue</code>](#Queue)
1612
- <a name="TreeLinker"></a>
1613
-
1614
- ## TreeLinker ⇒ [<code>TreeLinker</code>](#TreeLinker)
1615
- Make a new DoubleLinker from the data given if it is not already a valid Linker.
1616
-
1617
- **Kind**: global variable
1618
-
1619
- | Param | Type | Default | Description |
1620
- | --- | --- | --- | --- |
1621
- | linker | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | | Return a valid TreeLinker instance from given data, or even an already valid one. |
1622
- | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
1623
-
1624
-
1625
- * [TreeLinker](#TreeLinker) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1626
- * [new TreeLinker([settings], listClass)](#new_TreeLinker_new)
1627
- * _instance_
1628
- * [.childrenFromArray(children, listClass)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
1629
- * _static_
1630
- * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
1631
-
1632
- <a name="new_TreeLinker_new"></a>
1633
-
1634
- ### new TreeLinker([settings], listClass)
1635
- Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
1636
-
1637
-
1638
- | Param | Type | Default | Description |
1639
- | --- | --- | --- | --- |
1640
- | [settings] | <code>Object</code> | <code>{}</code> | |
1641
- | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
1642
- | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
1643
- | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
1644
- | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
1645
- | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
1646
- | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
1647
-
1648
- <a name="TreeLinker+childrenFromArray"></a>
1649
-
1650
- ### treeLinker.childrenFromArray(children, listClass) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
1651
- Create the children for this tree from an array.
1652
-
1653
- **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
1654
-
1655
- | Param | Type | Default | Description |
1656
- | --- | --- | --- | --- |
1657
- | children | <code>Array</code> \| <code>null</code> | <code></code> | Provide an array of data / linker references to be children of this tree node. |
1658
- | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
1659
-
1660
- <a name="TreeLinker.fromArray"></a>
1661
-
1662
- ### TreeLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
1663
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1664
-
1665
- **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
1666
-
1667
- | Param | Type | Default | Description |
1668
- | --- | --- | --- | --- |
1669
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
1670
- | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
1671
-
1672
- <a name="LinkedTreeList"></a>
1673
-
1674
- ## LinkedTreeList ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1675
- Convert an array into a LinkedTreeList instance, return the new instance.
1676
-
1677
- **Kind**: global variable
1678
-
1679
- | Param | Type | Default | Description |
1680
- | --- | --- | --- | --- |
1681
- | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to nodes in this tree-list |
1682
- | [linkerClass] | [<code>TreeLinker</code>](#TreeLinker) | <code>TreeLinker</code> | The class to use for each node |
1683
- | [classType] | [<code>IsArrayable.&lt;TreeLinker&gt;</code>](#TreeLinker) | <code>LinkedTreeList</code> | Provide the type of IsArrayable to use. |
1684
-
1685
-
1686
- * [LinkedTreeList](#LinkedTreeList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1687
- * [new LinkedTreeList()](#new_LinkedTreeList_new)
1688
- * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1689
- * [.first](#LinkedTreeList+first) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1690
- * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1691
- * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
1692
- * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1693
- * [.parent](#LinkedTreeList+parent)
1694
- * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1695
- * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1696
- * [.setChildren(item, children)](#LinkedTreeList+setChildren)
1697
- * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1698
- * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1699
- * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1700
- * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1701
- * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1702
- * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1703
- * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
1704
- * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
1705
-
1706
- <a name="new_LinkedTreeList_new"></a>
1707
-
1708
- ### new LinkedTreeList()
1709
- Create the new LinkedTreeList instance, configure the list class.
1710
-
1711
- <a name="LinkedTreeList+list"></a>
1712
-
1713
- ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
1714
- Retrieve a copy of the innerList used.
1715
-
1716
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1717
- **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
1718
- <a name="LinkedTreeList+first"></a>
1719
-
1720
- ### linkedTreeList.first ⇒ [<code>TreeLinker</code>](#TreeLinker)
1721
- Retrieve the first TreeLinker in the list.
1722
-
1723
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1724
- **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
1725
- <a name="LinkedTreeList+last"></a>
1726
-
1727
- ### linkedTreeList.last ⇒ [<code>TreeLinker</code>](#TreeLinker)
1728
- Retrieve the last TreeLinker in the list.
1729
-
1730
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1731
- **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
1732
- <a name="LinkedTreeList+length"></a>
1733
-
1734
- ### linkedTreeList.length ⇒ <code>number</code>
1735
- Return the length of the list.
1736
-
1737
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1738
- **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
1739
- <a name="LinkedTreeList+parent"></a>
1740
-
1741
- ### linkedTreeList.parent ⇒ [<code>TreeLinker</code>](#TreeLinker)
1742
- Get the parent of this tree list.
1743
-
1744
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1745
- <a name="LinkedTreeList+parent"></a>
1746
-
1747
- ### linkedTreeList.parent
1748
- Set the parent of this tree list
1749
-
1750
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1751
-
1752
- | Param | Type | Description |
1753
- | --- | --- | --- |
1754
- | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
1755
-
1756
- <a name="LinkedTreeList+rootParent"></a>
1757
-
1758
- ### linkedTreeList.rootParent ⇒ [<code>TreeLinker</code>](#TreeLinker)
1759
- Return the root parent of the entire tree.
1760
-
1761
- **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1762
- <a name="LinkedTreeList+initialize"></a>
1763
-
1764
- ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1765
- Initialize the inner list, should only run once.
1766
-
1767
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1768
- **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
1769
-
1770
- | Param | Type | Description |
1771
- | --- | --- | --- |
1772
- | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
1773
-
1774
- <a name="LinkedTreeList+setChildren"></a>
1775
-
1776
- ### linkedTreeList.setChildren(item, children)
1777
- Set the children on a parent item.
1778
-
1779
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1780
-
1781
- | Param | Type | Default | Description |
1782
- | --- | --- | --- | --- |
1783
- | item | [<code>TreeLinker</code>](#TreeLinker) | | The TreeLinker node that will be the parent of the children |
1784
- | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The LinkedTreeList which has the child nodes to use |
1785
-
1786
- <a name="LinkedTreeList+insertAfter"></a>
1787
-
1788
- ### linkedTreeList.insertAfter(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1789
- Insert a new node (or data) after a node.
1790
-
1791
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1792
- **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
1793
-
1794
- | Param | Type | Description |
1795
- | --- | --- | --- |
1796
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
1797
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
1798
-
1799
- <a name="LinkedTreeList+insertBefore"></a>
1800
-
1801
- ### linkedTreeList.insertBefore(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1802
- Insert a new node (or data) before a node.
1803
-
1804
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1805
- **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
1806
-
1807
- | Param | Type | Description |
1808
- | --- | --- | --- |
1809
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
1810
- | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
1811
-
1812
- <a name="LinkedTreeList+append"></a>
1813
-
1814
- ### linkedTreeList.append(node, after) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1815
- Add a node (or data) after the given (or last) node in the list.
1816
-
1817
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1818
- **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
1819
-
1820
- | Param | Type | Description |
1821
- | --- | --- | --- |
1822
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
1823
- | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
1824
-
1825
- <a name="LinkedTreeList+prepend"></a>
1826
-
1827
- ### linkedTreeList.prepend(node, before) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1828
- Add a node (or data) before the given (or first) node in the list.
1829
-
1830
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1831
- **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
1832
-
1833
- | Param | Type | Description |
1834
- | --- | --- | --- |
1835
- | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
1836
- | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
1837
-
1838
- <a name="LinkedTreeList+remove"></a>
1839
-
1840
- ### linkedTreeList.remove(node) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1841
- Remove a linker from this linked list.
1842
-
1843
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1844
- **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
1845
-
1846
- | Param | Type | Description |
1847
- | --- | --- | --- |
1848
- | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
1849
-
1850
- <a name="LinkedTreeList+reset"></a>
1851
-
1852
- ### linkedTreeList.reset() ⇒ [<code>TreeLinker</code>](#TreeLinker)
1853
- Refresh all references and return head reference.
1854
-
1855
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1856
- **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
1857
- <a name="LinkedTreeList+item"></a>
1858
-
1859
- ### linkedTreeList.item(index) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
1860
- Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
1861
-
1862
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1863
- **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
1864
-
1865
- | Param | Type | Description |
1866
- | --- | --- | --- |
1867
- | index | <code>number</code> | The integer number for retrieving a node by position. |
1868
-
1869
- <a name="LinkedTreeList+forEach"></a>
1870
-
1871
- ### linkedTreeList.forEach(callback, thisArg)
1872
- Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
1873
-
1874
- **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1875
- **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
1876
-
1877
- | Param | Type | Description |
1878
- | --- | --- | --- |
1879
- | callback | <code>forEachCallback</code> | The function to call for-each tree node |
1880
- | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
1881
-
1882
- <a name="Linker"></a>
1883
-
1884
- ## Linker ⇒ [<code>Linker</code>](#Linker)
1885
- Make a new Linker from the data given if it is not already a valid Linker.
1886
-
1887
- **Kind**: global variable
1888
-
1889
- | Param | Type | Default | Description |
1890
- | --- | --- | --- | --- |
1891
- | linker | [<code>Linker</code>](#Linker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
1892
- | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
1893
-
1894
-
1895
- * [Linker](#Linker) ⇒ [<code>Linker</code>](#Linker)
1896
- * [new Linker([nodeData])](#new_Linker_new)
1897
- * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
1898
-
1899
- <a name="new_Linker_new"></a>
1900
-
1901
- ### new Linker([nodeData])
1902
- Create the new Linker instance, provide the data and optionally give the next Linker.
1903
-
1904
-
1905
- | Param | Type | Default | Description |
1906
- | --- | --- | --- | --- |
1907
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
1908
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1909
- | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1910
-
1911
- <a name="Linker.fromArray"></a>
1912
-
1913
- ### Linker.fromArray([values], [classType]) ⇒ <code>Object</code>
1914
- Convert an array into Linker instances, return the head and tail Linkers.
1915
-
1916
- **Kind**: static method of [<code>Linker</code>](#Linker)
1917
-
1918
- | Param | Type | Default | Description |
1919
- | --- | --- | --- | --- |
1920
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1921
- | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
1922
-
1923
- <a name="LinkedList"></a>
1924
-
1925
- ## LinkedList ⇒ [<code>LinkedList</code>](#LinkedList)
1926
- Convert an array to a LinkedList.
1927
-
1928
- **Kind**: global variable
1929
-
1930
- | Param | Type | Default | Description |
1931
- | --- | --- | --- | --- |
1932
- | values | <code>Array</code> | | An array of values which will be converted to linkers in this linked-list |
1933
- | linkerClass | <code>IsLinker</code> | | The class to use for each linker |
1934
- | [classType] | [<code>IsArrayable.&lt;Linker&gt;</code>](#Linker) | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1935
-
1936
-
1937
- * [LinkedList](#LinkedList) ⇒ [<code>LinkedList</code>](#LinkedList)
1938
- * [new LinkedList()](#new_LinkedList_new)
1939
- * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
1940
- * [.first](#LinkedList+first) ⇒ [<code>Linker</code>](#Linker)
1941
- * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
1942
- * [.length](#LinkedList+length) ⇒ <code>number</code>
1943
- * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
1944
- * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
1945
- * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
1946
- * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
1947
- * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
1948
- * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
1949
- * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
1950
- * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
1951
-
1952
- <a name="new_LinkedList_new"></a>
1953
-
1954
- ### new LinkedList()
1955
- Create the new LinkedList instance.
1956
-
1957
- <a name="LinkedList+list"></a>
1958
-
1959
- ### linkedList.list ⇒ [<code>Linker</code>](#Linker)
1960
- Retrieve a copy of the innerList used.
1961
-
1962
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1963
- **Overrides**: [<code>list</code>](#Arrayable+list)
1964
- <a name="LinkedList+first"></a>
1965
-
1966
- ### linkedList.first ⇒ [<code>Linker</code>](#Linker)
1967
- Retrieve the first Linker in the list.
1968
-
1969
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1970
- **Overrides**: [<code>first</code>](#Arrayable+first)
1971
- <a name="LinkedList+last"></a>
1972
-
1973
- ### linkedList.last ⇒ [<code>Linker</code>](#Linker)
1974
- Retrieve the last Linker in the list.
1975
-
1976
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1977
- **Overrides**: [<code>last</code>](#Arrayable+last)
1978
- <a name="LinkedList+length"></a>
1979
-
1980
- ### linkedList.length ⇒ <code>number</code>
1981
- Return the length of the list.
1982
-
1983
- **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1984
- **Overrides**: [<code>length</code>](#Arrayable+length)
1985
- <a name="LinkedList+initialize"></a>
1986
-
1987
- ### linkedList.initialize(initialList) ⇒ [<code>LinkedList</code>](#LinkedList)
1988
- Initialize the inner list, should only run once.
1989
-
1990
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
1991
- **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
1992
-
1993
- | Param | Type | Description |
1994
- | --- | --- | --- |
1995
- | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
1996
-
1997
- <a name="LinkedList+insertAfter"></a>
1998
-
1999
- ### linkedList.insertAfter(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
2000
- Insert a new node (or data) after a node.
2001
-
2002
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2003
- **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
2004
-
2005
- | Param | Type | Description |
2006
- | --- | --- | --- |
2007
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
2008
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
2009
-
2010
- <a name="LinkedList+insertBefore"></a>
2011
-
2012
- ### linkedList.insertBefore(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
2013
- Insert a new node (or data) before a node.
2014
-
2015
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2016
- **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
2017
-
2018
- | Param | Type | Description |
2019
- | --- | --- | --- |
2020
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
2021
- | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
2022
-
2023
- <a name="LinkedList+append"></a>
2024
-
2025
- ### linkedList.append(node, after) ⇒ [<code>Linker</code>](#Linker)
2026
- Add a node (or data) after the given (or last) node in the list.
2027
-
2028
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2029
- **Overrides**: [<code>append</code>](#Arrayable+append)
2030
-
2031
- | Param | Type | Description |
2032
- | --- | --- | --- |
2033
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
2034
- | after | [<code>Linker</code>](#Linker) | The existing last node |
2035
-
2036
- <a name="LinkedList+prepend"></a>
2037
-
2038
- ### linkedList.prepend(node, before) ⇒ [<code>Linker</code>](#Linker)
2039
- Add a node (or data) before the given (or first) node in the list.
2040
-
2041
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2042
- **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
2043
-
2044
- | Param | Type | Description |
2045
- | --- | --- | --- |
2046
- | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
2047
- | before | [<code>Linker</code>](#Linker) | The existing first node |
2048
-
2049
- <a name="LinkedList+remove"></a>
2050
-
2051
- ### linkedList.remove(node) ⇒ [<code>Linker</code>](#Linker)
2052
- Remove a linker from this linked list.
2053
-
2054
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2055
- **Overrides**: [<code>remove</code>](#Arrayable+remove)
2056
-
2057
- | Param | Type | Description |
2058
- | --- | --- | --- |
2059
- | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
2060
-
2061
- <a name="LinkedList+item"></a>
2062
-
2063
- ### linkedList.item(index) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
2064
- Retrieve a Linker item from this list by numeric index, otherwise return null.
2065
-
2066
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2067
- **Overrides**: [<code>item</code>](#Arrayable+item)
2068
-
2069
- | Param | Type | Description |
2070
- | --- | --- | --- |
2071
- | index | <code>number</code> | The integer number for retrieving a node by position. |
2072
-
2073
- <a name="LinkedList+forEach"></a>
2074
-
2075
- ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
2076
- Be able to run forEach on this LinkedList to iterate over the linkers.
2077
-
2078
- **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2079
- **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
2080
-
2081
- | Param | Type | Description |
2082
- | --- | --- | --- |
2083
- | callback | <code>forEachCallback</code> | The function to call for-each linker |
2084
- | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
2085
-
2086
- <a name="DoublyLinkedList"></a>
2087
-
2088
- ## DoublyLinkedList ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2089
- Convert an array into a DoublyLinkedList instance, return the new instance.
2090
-
2091
- **Kind**: global variable
2092
-
2093
- | Param | Type | Default | Description |
2094
- | --- | --- | --- | --- |
2095
- | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to linkers in this doubly-linked-list |
2096
- | [linkerClass] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | The class to use for each linker |
2097
- | [classType] | <code>IsArrayable.&lt;IsDoubleLinker&gt;</code> | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
2098
-
2099
-
2100
- * [DoublyLinkedList](#DoublyLinkedList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2101
- * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
2102
- * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2103
- * [.first](#DoublyLinkedList+first) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2104
- * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2105
- * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
2106
- * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2107
- * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2108
- * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2109
- * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2110
- * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2111
- * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2112
- * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2113
- * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
2114
- * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
2115
-
2116
- <a name="new_DoublyLinkedList_new"></a>
2117
-
2118
- ### new DoublyLinkedList()
2119
- Create the new DoublyLinkedList instance.
2120
-
2121
- <a name="DoublyLinkedList+list"></a>
2122
-
2123
- ### doublyLinkedList.list ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2124
- Retrieve a copy of the innerList used.
2125
-
2126
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2127
- **Overrides**: [<code>list</code>](#LinkedList+list)
2128
- <a name="DoublyLinkedList+first"></a>
2129
-
2130
- ### doublyLinkedList.first ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2131
- Retrieve the first DoubleLinker in the list.
2132
-
2133
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2134
- **Overrides**: [<code>first</code>](#LinkedList+first)
2135
- <a name="DoublyLinkedList+last"></a>
2136
-
2137
- ### doublyLinkedList.last ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2138
- Retrieve the last DoubleLinker in the list.
2139
-
2140
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2141
- **Overrides**: [<code>last</code>](#LinkedList+last)
2142
- <a name="DoublyLinkedList+length"></a>
2143
-
2144
- ### doublyLinkedList.length ⇒ <code>number</code>
2145
- Return the length of the list.
2146
-
2147
- **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2148
- **Overrides**: [<code>length</code>](#LinkedList+length)
2149
- <a name="DoublyLinkedList+initialize"></a>
2150
-
2151
- ### doublyLinkedList.initialize(initialList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2152
- Initialize the inner list, should only run once.
2153
-
2154
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2155
- **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
2156
-
2157
- | Param | Type | Description |
2158
- | --- | --- | --- |
2159
- | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
2160
-
2161
- <a name="DoublyLinkedList+insertAfter"></a>
2162
-
2163
- ### doublyLinkedList.insertAfter(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2164
- Insert a new node (or data) after a node.
2165
-
2166
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2167
- **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
2168
-
2169
- | Param | Type | Description |
2170
- | --- | --- | --- |
2171
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
2172
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
2173
-
2174
- <a name="DoublyLinkedList+insertBefore"></a>
2175
-
2176
- ### doublyLinkedList.insertBefore(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2177
- Insert a new node (or data) before a node.
2178
-
2179
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2180
- **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
2181
-
2182
- | Param | Type | Description |
2183
- | --- | --- | --- |
2184
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
2185
- | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
2186
-
2187
- <a name="DoublyLinkedList+append"></a>
2188
-
2189
- ### doublyLinkedList.append(node, after) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2190
- Add a node (or data) after the given (or last) node in the list.
2191
-
2192
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2193
- **Overrides**: [<code>append</code>](#LinkedList+append)
2194
-
2195
- | Param | Type | Description |
2196
- | --- | --- | --- |
2197
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
2198
- | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
2199
-
2200
- <a name="DoublyLinkedList+prepend"></a>
2201
-
2202
- ### doublyLinkedList.prepend(node, before) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2203
- Add a node (or data) before the given (or first) node in the list.
2204
-
2205
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2206
- **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
2207
-
2208
- | Param | Type | Description |
2209
- | --- | --- | --- |
2210
- | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
2211
- | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
2212
-
2213
- <a name="DoublyLinkedList+remove"></a>
2214
-
2215
- ### doublyLinkedList.remove(node) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2216
- Remove a linker from this linked list.
2217
-
2218
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2219
- **Overrides**: [<code>remove</code>](#LinkedList+remove)
2220
-
2221
- | Param | Type | Description |
2222
- | --- | --- | --- |
2223
- | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
2224
-
2225
- <a name="DoublyLinkedList+reset"></a>
2226
-
2227
- ### doublyLinkedList.reset() ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2228
- Refresh all references and return head reference.
2229
-
2230
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2231
- <a name="DoublyLinkedList+item"></a>
2232
-
2233
- ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
2234
- Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
2235
-
2236
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2237
- **Overrides**: [<code>item</code>](#LinkedList+item)
2238
-
2239
- | Param | Type | Description |
2240
- | --- | --- | --- |
2241
- | index | <code>number</code> | The integer number for retrieving a node by position. |
2242
-
2243
- <a name="DoublyLinkedList+forEach"></a>
2244
-
2245
- ### doublyLinkedList.forEach(callback, thisArg)
2246
- Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
2247
-
2248
- **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2249
- **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
2250
-
2251
- | Param | Type | Description |
2252
- | --- | --- | --- |
2253
- | callback | <code>forEachCallback</code> | The function to call for-each double linker |
2254
- | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
2255
-
2256
- <a name="DoubleLinker"></a>
2257
-
2258
- ## DoubleLinker ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2259
- Make a new DoubleLinker from the data given if it is not already a valid Linker.
2260
-
2261
- **Kind**: global variable
2262
-
2263
- | Param | Type | Default | Description |
2264
- | --- | --- | --- | --- |
2265
- | linker | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
2266
- | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
2267
-
2268
-
2269
- * [DoubleLinker](#DoubleLinker) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2270
- * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
2271
- * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
2272
-
2273
- <a name="new_DoubleLinker_new"></a>
2274
-
2275
- ### new DoubleLinker([nodeData])
2276
- Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
2277
-
2278
-
2279
- | Param | Type | Default | Description |
2280
- | --- | --- | --- | --- |
2281
- | [nodeData] | <code>Object</code> | <code>{}</code> | |
2282
- | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
2283
- | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
2284
- | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
2285
-
2286
- <a name="DoubleLinker.fromArray"></a>
2287
-
2288
- ### DoubleLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
2289
- Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
2290
-
2291
- **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
2292
-
2293
- | Param | Type | Default | Description |
2294
- | --- | --- | --- | --- |
2295
- | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
2296
- | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
2297
-
2298
- <a name="Arrayable"></a>
2299
-
2300
- ## Arrayable ⇒ [<code>Arrayable</code>](#Arrayable)
2301
- Convert an array to an Arrayable.
2302
-
2303
- **Kind**: global variable
2304
-
2305
- | Param | Type | Default | Description |
2306
- | --- | --- | --- | --- |
2307
- | values | <code>Array</code> | | An array of values which will be converted to elements in this arrayable |
2308
- | [elementClass] | <code>IsElement</code> | <code>ArrayElement</code> | The class to use for each element |
2309
- | [classType] | [<code>IsArrayable.&lt;ArrayElement&gt;</code>](#ArrayElement) | <code>Arrayable</code> | Provide the type of IsArrayable to use. |
2310
-
2311
-
2312
- * [Arrayable](#Arrayable) ⇒ [<code>Arrayable</code>](#Arrayable)
2313
- * [new Arrayable()](#new_Arrayable_new)
2314
- * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
2315
- * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2316
- * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2317
- * [.length](#Arrayable+length) ⇒ <code>number</code>
2318
- * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
2319
- * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
2320
- * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
2321
- * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
2322
- * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
2323
- * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2324
- * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
2325
- * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
2326
-
2327
- <a name="new_Arrayable_new"></a>
2328
-
2329
- ### new Arrayable()
2330
- Create the new Arrayable instance, configure the Arrayable class.
2331
-
2332
- <a name="Arrayable+list"></a>
2333
-
2334
- ### arrayable.list ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
2335
- Retrieve a copy of the innerList used.
2336
-
2337
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2338
- <a name="Arrayable+first"></a>
2339
-
2340
- ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
2341
- Retrieve the first Element from the Arrayable
2342
-
2343
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2344
- <a name="Arrayable+last"></a>
2345
-
2346
- ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
2347
- Retrieve the last Element from the Arrayable
2348
-
2349
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2350
- <a name="Arrayable+length"></a>
2351
-
2352
- ### arrayable.length ⇒ <code>number</code>
2353
- Return the length of the list.
2354
-
2355
- **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2356
- <a name="Arrayable+initialize"></a>
2357
-
2358
- ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
2359
- Initialize the inner list, should only run once.
2360
-
2361
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2362
-
2363
- | Param | Type | Description |
2364
- | --- | --- | --- |
2365
- | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
2366
-
2367
- <a name="Arrayable+insertAfter"></a>
2368
-
2369
- ### arrayable.insertAfter(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
2370
- Insert a new node (or data) after a node.
2371
-
2372
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2373
-
2374
- | Param | Type | Description |
2375
- | --- | --- | --- |
2376
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
2377
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
2378
-
2379
- <a name="Arrayable+insertBefore"></a>
2380
-
2381
- ### arrayable.insertBefore(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
2382
- Insert a new node (or data) before a node.
2383
-
2384
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2385
-
2386
- | Param | Type | Description |
2387
- | --- | --- | --- |
2388
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
2389
- | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
2390
-
2391
- <a name="Arrayable+append"></a>
2392
-
2393
- ### arrayable.append(node, after) ⇒ [<code>Arrayable</code>](#Arrayable)
2394
- Add a node (or data) after the given (or last) node in the list.
2395
-
2396
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2397
-
2398
- | Param | Type | Description |
2399
- | --- | --- | --- |
2400
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
2401
- | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
2402
-
2403
- <a name="Arrayable+prepend"></a>
2404
-
2405
- ### arrayable.prepend(node, before) ⇒ [<code>Arrayable</code>](#Arrayable)
2406
- Add a node (or data) before the given (or first) node in the list.
2407
-
2408
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2409
-
2410
- | Param | Type | Description |
2411
- | --- | --- | --- |
2412
- | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
2413
- | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
2414
-
2415
- <a name="Arrayable+remove"></a>
2416
-
2417
- ### arrayable.remove(node) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2418
- Remove an element from this arrayable.
2419
-
2420
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2421
-
2422
- | Param | Type | Description |
2423
- | --- | --- | --- |
2424
- | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
2425
-
2426
- <a name="Arrayable+item"></a>
2427
-
2428
- ### arrayable.item(index) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
2429
- Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
2430
-
2431
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2432
-
2433
- | Param | Type | Description |
2434
- | --- | --- | --- |
2435
- | index | <code>number</code> | The integer number for retrieving a node by position. |
2436
-
2437
- <a name="Arrayable+forEach"></a>
2438
-
2439
- ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
2440
- Be able to run forEach on this Arrayable to iterate over the elements.
2441
-
2442
- **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2443
-
2444
- | Param | Type | Description |
2445
- | --- | --- | --- |
2446
- | callback | <code>forEachCallback</code> | The function to call for-each element |
2447
- | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
2448
-
2449
- <a name="ArrayElement"></a>
2450
-
2451
- ## ArrayElement ⇒ [<code>ArrayElement</code>](#ArrayElement)
2452
- Make a new Element from the data given if it is not already a valid Element.
2453
-
2454
- **Kind**: global variable
2455
-
2456
- | Param | Type | Default | Description |
2457
- | --- | --- | --- | --- |
2458
- | element | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | | Return a valid ArrayElement instance from given data, or even an already valid one. |
2459
- | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
2460
-
2461
-
2462
- * [ArrayElement](#ArrayElement) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2463
- * [new ArrayElement([data])](#new_ArrayElement_new)
2464
- * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
2465
-
2466
- <a name="new_ArrayElement_new"></a>
2467
-
2468
- ### new ArrayElement([data])
2469
- Create the new Element instance, provide the data and optionally configure the type of Element.
2470
-
2471
-
2472
- | Param | Type | Default | Description |
2473
- | --- | --- | --- | --- |
2474
- | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
2475
-
2476
- <a name="ArrayElement.fromArray"></a>
2477
-
2478
- ### ArrayElement.fromArray([values], [classType]) ⇒ <code>Object</code>
2479
- Convert an array into Element instances, return the head and tail Elements.
2480
-
2481
- **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
2482
-
2483
- | Param | Type | Default | Description |
2484
- | --- | --- | --- | --- |
2485
- | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
2486
- | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
2487
-
2488
- <a name="services"></a>
2489
-
2490
- ## services
2491
- List helpful functions when dealing with collections.
2492
-
2493
- **Kind**: global constant
2494
- <a name="recipes"></a>
2495
-
2496
- ## recipes
2497
- List of class declarations that can be used to specify attributes for a style of object / class.
2498
-
2499
- **Kind**: global constant
2500
- <a name="parseTreeNext"></a>
2501
-
2502
- ## parseTreeNext(treeNode) ⇒ <code>IsTreeNode</code> \| <code>null</code>
2503
- Be able to parse over every node in a tree.
2504
- 1. Start at root (get root parent)
2505
- 2. Get first child (repeat until no children)
2506
- 3. Check next child
2507
- 4. Repeat 2
2508
- 5. Repeat 3
2509
- 6. If no next child, return to parent and repeat 3
2510
- 7. Stop at root (next is null and parent is null
2511
-
2512
- **Kind**: global function
2513
-
2514
- | Param | Type | Description |
2515
- | --- | --- | --- |
2516
- | treeNode | <code>IsTreeNode</code> | Provide a node in a tree and get the next node (left-first approach) |
2517
-
2518
- <a name="parseTree"></a>
2519
-
2520
- ## parseTree(tree, callback) ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code>
2521
- Loop over all the nodes in a tree starting from left and apply a callback for each
2522
-
2523
- **Kind**: global function
2524
-
2525
- | Param | Type |
2526
- | --- | --- |
2527
- | tree | <code>IsArrayable.&lt;IsTreeNode&gt;</code> |
2528
- | callback | <code>forEachCallback</code> |
2529
-
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
+ ## Members
70
+
71
+ <dl>
72
+ <dt><a href="#Stackable">Stackable</a> ⇒ <code><a href="#Stackable">Stackable</a></code></dt>
73
+ <dd><p>Make a new Stackable from the data given if it is not already a valid Stackable.</p>
74
+ </dd>
75
+ <dt><a href="#Stack">Stack</a> ⇒ <code><a href="#Stack">Stack</a></code></dt>
76
+ <dd><p>Convert an array to a Stack.</p>
77
+ </dd>
78
+ <dt><a href="#Queueable">Queueable</a> ⇒ <code><a href="#Queueable">Queueable</a></code></dt>
79
+ <dd><p>Make a new Queueable from the data given if it is not already a valid Queueable.</p>
80
+ </dd>
81
+ <dt><a href="#Queue">Queue</a> ⇒ <code><a href="#Queue">Queue</a></code></dt>
82
+ <dd><p>Convert an array to a Queue.</p>
83
+ </dd>
84
+ <dt><a href="#TreeLinker">TreeLinker</a> ⇒ <code><a href="#TreeLinker">TreeLinker</a></code></dt>
85
+ <dd><p>Make a new DoubleLinker from the data given if it is not already a valid Linker.</p>
86
+ </dd>
87
+ <dt><a href="#LinkedTreeList">LinkedTreeList</a> ⇒ <code><a href="#LinkedTreeList">LinkedTreeList</a></code></dt>
88
+ <dd><p>Convert an array into a LinkedTreeList instance, return the new instance.</p>
89
+ </dd>
90
+ <dt><a href="#Linker">Linker</a> ⇒ <code><a href="#Linker">Linker</a></code></dt>
91
+ <dd><p>Make a new Linker from the data given if it is not already a valid Linker.</p>
92
+ </dd>
93
+ <dt><a href="#LinkedList">LinkedList</a> ⇒ <code><a href="#LinkedList">LinkedList</a></code></dt>
94
+ <dd><p>Convert an array to a LinkedList.</p>
95
+ </dd>
96
+ <dt><a href="#DoublyLinkedList">DoublyLinkedList</a> ⇒ <code><a href="#DoublyLinkedList">DoublyLinkedList</a></code></dt>
97
+ <dd><p>Convert an array into a DoublyLinkedList instance, return the new instance.</p>
98
+ </dd>
99
+ <dt><a href="#DoubleLinker">DoubleLinker</a> ⇒ <code><a href="#DoubleLinker">DoubleLinker</a></code></dt>
100
+ <dd><p>Make a new DoubleLinker from the data given if it is not already a valid Linker.</p>
101
+ </dd>
102
+ <dt><a href="#Arrayable">Arrayable</a> ⇒ <code><a href="#Arrayable">Arrayable</a></code></dt>
103
+ <dd><p>Convert an array to an Arrayable.</p>
104
+ </dd>
105
+ <dt><a href="#ArrayElement">ArrayElement</a> ⇒ <code><a href="#ArrayElement">ArrayElement</a></code></dt>
106
+ <dd><p>Make a new Element from the data given if it is not already a valid Element.</p>
107
+ </dd>
108
+ </dl>
109
+
110
+ ## Constants
111
+
112
+ <dl>
113
+ <dt><a href="#services">services</a></dt>
114
+ <dd><p>List helpful functions when dealing with collections.</p>
115
+ </dd>
116
+ <dt><a href="#recipes">recipes</a></dt>
117
+ <dd><p>List of class declarations that can be used to specify attributes for a style of object / class.</p>
118
+ </dd>
119
+ </dl>
120
+
121
+ ## Functions
122
+
123
+ <dl>
124
+ <dt><a href="#parseTreeNext">parseTreeNext(treeNode)</a> ⇒ <code>IsTreeNode</code> | <code>null</code></dt>
125
+ <dd><p>Be able to parse over every node in a tree.</p>
126
+ <ol>
127
+ <li>Start at root (get root parent)</li>
128
+ <li>Get first child (repeat until no children)</li>
129
+ <li>Check next child</li>
130
+ <li>Repeat 2</li>
131
+ <li>Repeat 3</li>
132
+ <li>If no next child, return to parent and repeat 3</li>
133
+ <li>Stop at root (next is null and parent is null</li>
134
+ </ol>
135
+ </dd>
136
+ <dt><a href="#parseTree">parseTree(tree, callback)</a> ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code></dt>
137
+ <dd><p>Loop over all the nodes in a tree starting from left and apply a callback for each</p>
138
+ </dd>
139
+ </dl>
140
+
141
+ <a name="module_collect-your-stuff"></a>
142
+
143
+ ## collect-your-stuff
144
+ All of the collections available.
145
+
146
+ **Version**: 1.0.0
147
+ **Author**: Joshua Heagle <joshuaheagle@gmail.com>
148
+ <a name="module_collect-your-stuff..collectYourStuff"></a>
149
+
150
+ ### collect-your-stuff~collectYourStuff
151
+ All methods exported from this module are encapsulated within collect-your-stuff.
152
+
153
+ **Kind**: inner constant of [<code>collect-your-stuff</code>](#module_collect-your-stuff)
154
+ <a name="TreeLinkerIterator"></a>
155
+
156
+ ## TreeLinkerIterator
157
+ Class TreeLinkerIterator returns the next value taking a left-first approach down a tree.
158
+
159
+ **Kind**: global class
160
+ <a name="Runnable"></a>
161
+
162
+ ## Runnable
163
+ Identify a class that can be run.
164
+
165
+ **Kind**: global class
166
+
167
+ * [Runnable](#Runnable)
168
+ * [new Runnable(data)](#new_Runnable_new)
169
+ * _instance_
170
+ * [.task](#Runnable+task) ⇒ <code>function</code>
171
+ * [.run()](#Runnable+run) ⇒ <code>\*</code>
172
+ * _static_
173
+ * [.isRunnable(thing)](#Runnable.isRunnable) ⇒ <code>boolean</code>
174
+
175
+ <a name="new_Runnable_new"></a>
176
+
177
+ ### new Runnable(data)
178
+ Instantiate a Runnable class.
179
+
180
+
181
+ | Param | Type | Default |
182
+ | --- | --- | --- |
183
+ | data | <code>\*</code> | <code></code> |
184
+
185
+ <a name="Runnable+task"></a>
186
+
187
+ ### runnable.task ⇒ <code>function</code>
188
+ Retrieve the data which should be formed as a task.
189
+
190
+ **Kind**: instance property of [<code>Runnable</code>](#Runnable)
191
+ <a name="Runnable+run"></a>
192
+
193
+ ### runnable.run() ⇒ <code>\*</code>
194
+ Run the runnable task.
195
+
196
+ **Kind**: instance method of [<code>Runnable</code>](#Runnable)
197
+ <a name="Runnable.isRunnable"></a>
198
+
199
+ ### Runnable.isRunnable(thing) ⇒ <code>boolean</code>
200
+ Check if a given thing is Runnable
201
+
202
+ **Kind**: static method of [<code>Runnable</code>](#Runnable)
203
+
204
+ | Param | Type |
205
+ | --- | --- |
206
+ | thing | <code>\*</code> |
207
+
208
+ <a name="LinkerIterator"></a>
209
+
210
+ ## LinkerIterator
211
+ Class LinkerIterator returns the next value when using linkers of linked type lists.
212
+
213
+ **Kind**: global class
214
+ <a name="DoubleLinkerIterator"></a>
215
+
216
+ ## DoubleLinkerIterator
217
+ Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
218
+
219
+ **Kind**: global class
220
+ <a name="ArrayIterator"></a>
221
+
222
+ ## ArrayIterator
223
+ Class ArrayIterator returns the next value when using elements of array type list.
224
+
225
+ **Kind**: global class
226
+ <a name="Stackable"></a>
227
+
228
+ ## Stackable ⇐ [<code>Linker</code>](#Linker)
229
+ Stackable represents a runnable entry in stack.
230
+
231
+ **Kind**: global class
232
+ **Extends**: [<code>Linker</code>](#Linker)
233
+
234
+ * [Stackable](#Stackable) ⇐ [<code>Linker</code>](#Linker)
235
+ * [new Stackable([stackData])](#new_Stackable_new)
236
+ * _instance_
237
+ * [.task](#Stackable+task) ⇒ <code>\*</code>
238
+ * [.run()](#Stackable+run) ⇒ <code>\*</code>
239
+ * _static_
240
+ * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
241
+
242
+ <a name="new_Stackable_new"></a>
243
+
244
+ ### new Stackable([stackData])
245
+ Create a stackable item that can be used in a stack.
246
+
247
+
248
+ | Param | Type | Default | Description |
249
+ | --- | --- | --- | --- |
250
+ | [stackData] | <code>Object</code> | <code>{}</code> | |
251
+ | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
252
+ | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
253
+ | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
254
+
255
+ <a name="Stackable+task"></a>
256
+
257
+ ### stackable.task ⇒ <code>\*</code>
258
+ Retrieve the data which should be formed as a task.
259
+
260
+ **Kind**: instance property of [<code>Stackable</code>](#Stackable)
261
+ <a name="Stackable+run"></a>
262
+
263
+ ### stackable.run() ⇒ <code>\*</code>
264
+ Run the stacked task.
265
+
266
+ **Kind**: instance method of [<code>Stackable</code>](#Stackable)
267
+ <a name="Stackable.fromArray"></a>
268
+
269
+ ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
270
+ Convert an array into Stackable instances, return the head and tail Stackables.
271
+
272
+ **Kind**: static method of [<code>Stackable</code>](#Stackable)
273
+
274
+ | Param | Type | Default | Description |
275
+ | --- | --- | --- | --- |
276
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
277
+ | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
278
+
279
+ <a name="Stack"></a>
280
+
281
+ ## Stack
282
+ Store a collection of items which can only be inserted and removed from the top.
283
+
284
+ **Kind**: global class
285
+
286
+ * [Stack](#Stack)
287
+ * [new Stack(stackedList, listClass, stackableClass)](#new_Stack_new)
288
+ * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
289
+ * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
290
+ * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
291
+ * [.push(stackable)](#Stack+push)
292
+ * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
293
+ * [.size()](#Stack+size) ⇒ <code>number</code>
294
+
295
+ <a name="new_Stack_new"></a>
296
+
297
+ ### new Stack(stackedList, listClass, stackableClass)
298
+ Instantiate the state with the starter stacked list.
299
+
300
+
301
+ | Param | Type | Default |
302
+ | --- | --- | --- |
303
+ | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> |
304
+ | listClass | <code>IsArrayable</code> | |
305
+ | stackableClass | [<code>Stackable</code>](#Stackable) | |
306
+
307
+ <a name="Stack+empty"></a>
308
+
309
+ ### stack.empty() ⇒ <code>boolean</code>
310
+ Return true if the stack is empty (there are no tasks in the stacked list)
311
+
312
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
313
+ <a name="Stack+top"></a>
314
+
315
+ ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
316
+ Take a look at the next stacked task
317
+
318
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
319
+ <a name="Stack+pop"></a>
320
+
321
+ ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
322
+ Remove the next stacked task and return it.
323
+
324
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
325
+ <a name="Stack+push"></a>
326
+
327
+ ### stack.push(stackable)
328
+ Push a stackable task to the top of the stack.
329
+
330
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
331
+
332
+ | Param | Type | Description |
333
+ | --- | --- | --- |
334
+ | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
335
+
336
+ <a name="Stack+remove"></a>
337
+
338
+ ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
339
+ Remove the next stacked task and return it.
340
+
341
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
342
+ <a name="Stack+size"></a>
343
+
344
+ ### stack.size() ⇒ <code>number</code>
345
+ Get the size of the current stack.
346
+
347
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
348
+ <a name="Queueable"></a>
349
+
350
+ ## Queueable ⇐ [<code>Linker</code>](#Linker)
351
+ Queueable represents a runnable entry in a queue.
352
+
353
+ **Kind**: global class
354
+ **Extends**: [<code>Linker</code>](#Linker)
355
+
356
+ * [Queueable](#Queueable) ⇐ [<code>Linker</code>](#Linker)
357
+ * [new Queueable([queueableData])](#new_Queueable_new)
358
+ * _instance_
359
+ * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
360
+ * [.task](#Queueable+task) ⇒ <code>\*</code>
361
+ * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
362
+ * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
363
+ * _static_
364
+ * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
365
+
366
+ <a name="new_Queueable_new"></a>
367
+
368
+ ### new Queueable([queueableData])
369
+ Create a queueable item that can be used in a queue.
370
+
371
+
372
+ | Param | Type | Default | Description |
373
+ | --- | --- | --- | --- |
374
+ | [queueableData] | <code>Object</code> | <code>{}</code> | |
375
+ | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
376
+ | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
377
+ | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
378
+
379
+ <a name="Queueable+isReady"></a>
380
+
381
+ ### queueable.isReady ⇒ <code>boolean</code>
382
+ Check ready state.
383
+
384
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
385
+ <a name="Queueable+task"></a>
386
+
387
+ ### queueable.task ⇒ <code>\*</code>
388
+ Retrieve the data which should be formed as a task.
389
+
390
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
391
+ <a name="Queueable+markCompleted"></a>
392
+
393
+ ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
394
+ Set this queueable as completed.
395
+
396
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
397
+
398
+ | Param | Type | Default | Description |
399
+ | --- | --- | --- | --- |
400
+ | completeResponse | <code>Object</code> | | |
401
+ | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
402
+ | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
403
+ | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
404
+
405
+ <a name="Queueable+run"></a>
406
+
407
+ ### queueable.run() ⇒ <code>completeResponse</code>
408
+ Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
409
+
410
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
411
+ <a name="Queueable.fromArray"></a>
412
+
413
+ ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
414
+ Convert an array into Queueable instances, return the head and tail Queueables.
415
+
416
+ **Kind**: static method of [<code>Queueable</code>](#Queueable)
417
+
418
+ | Param | Type | Default | Description |
419
+ | --- | --- | --- | --- |
420
+ | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
421
+ | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
422
+
423
+ <a name="Queue"></a>
424
+
425
+ ## Queue
426
+ Maintain a series of queued items.
427
+
428
+ **Kind**: global class
429
+
430
+ * [Queue](#Queue)
431
+ * [new Queue(queuedList, listClass, queueableClass)](#new_Queue_new)
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
+
439
+ <a name="new_Queue_new"></a>
440
+
441
+ ### new Queue(queuedList, listClass, queueableClass)
442
+ Instantiate the queue with the given queue list.
443
+
444
+
445
+ | Param | Type | Default | Description |
446
+ | --- | --- | --- | --- |
447
+ | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> | Give the list of queueables to start in this queue. |
448
+ | listClass | <code>IsArrayable</code> | | |
449
+ | queueableClass | [<code>Queueable</code>](#Queueable) | | |
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="TreeLinker"></a>
493
+
494
+ ## TreeLinker ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
495
+ TreeLinker represents a node in a LinkedTreeList having a parent (or root) and child nodes.
496
+
497
+ **Kind**: global class
498
+ **Extends**: [<code>DoubleLinker</code>](#DoubleLinker)
499
+
500
+ * [TreeLinker](#TreeLinker) ⇐ [<code>DoubleLinker</code>](#DoubleLinker)
501
+ * [new TreeLinker([settings], listClass)](#new_TreeLinker_new)
502
+ * _instance_
503
+ * [.childrenFromArray(children, listClass)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
504
+ * _static_
505
+ * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
506
+
507
+ <a name="new_TreeLinker_new"></a>
508
+
509
+ ### new TreeLinker([settings], listClass)
510
+ Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
511
+
512
+
513
+ | Param | Type | Default | Description |
514
+ | --- | --- | --- | --- |
515
+ | [settings] | <code>Object</code> | <code>{}</code> | |
516
+ | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
517
+ | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
518
+ | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
519
+ | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
520
+ | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
521
+ | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
522
+
523
+ <a name="TreeLinker+childrenFromArray"></a>
524
+
525
+ ### treeLinker.childrenFromArray(children, listClass) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
526
+ Create the children for this tree from an array.
527
+
528
+ **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
529
+
530
+ | Param | Type | Default | Description |
531
+ | --- | --- | --- | --- |
532
+ | children | <code>Array</code> \| <code>null</code> | <code></code> | Provide an array of data / linker references to be children of this tree node. |
533
+ | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
534
+
535
+ <a name="TreeLinker.fromArray"></a>
536
+
537
+ ### TreeLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
538
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
539
+
540
+ **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
541
+
542
+ | Param | Type | Default | Description |
543
+ | --- | --- | --- | --- |
544
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
545
+ | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
546
+
547
+ <a name="LinkedTreeList"></a>
548
+
549
+ ## LinkedTreeList ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
550
+ LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.
551
+
552
+ **Kind**: global class
553
+ **Extends**: [<code>DoublyLinkedList</code>](#DoublyLinkedList)
554
+
555
+ * [LinkedTreeList](#LinkedTreeList) ⇐ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
556
+ * [new LinkedTreeList()](#new_LinkedTreeList_new)
557
+ * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
558
+ * [.first](#LinkedTreeList+first) ⇒ [<code>TreeLinker</code>](#TreeLinker)
559
+ * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
560
+ * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
561
+ * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
562
+ * [.parent](#LinkedTreeList+parent)
563
+ * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
564
+ * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
565
+ * [.setChildren(item, children)](#LinkedTreeList+setChildren)
566
+ * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
567
+ * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
568
+ * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
569
+ * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
570
+ * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
571
+ * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
572
+ * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
573
+ * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
574
+
575
+ <a name="new_LinkedTreeList_new"></a>
576
+
577
+ ### new LinkedTreeList()
578
+ Create the new LinkedTreeList instance, configure the list class.
579
+
580
+ <a name="LinkedTreeList+list"></a>
581
+
582
+ ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
583
+ Retrieve a copy of the innerList used.
584
+
585
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
586
+ **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
587
+ <a name="LinkedTreeList+first"></a>
588
+
589
+ ### linkedTreeList.first ⇒ [<code>TreeLinker</code>](#TreeLinker)
590
+ Retrieve the first TreeLinker in the list.
591
+
592
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
593
+ **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
594
+ <a name="LinkedTreeList+last"></a>
595
+
596
+ ### linkedTreeList.last ⇒ [<code>TreeLinker</code>](#TreeLinker)
597
+ Retrieve the last TreeLinker in the list.
598
+
599
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
600
+ **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
601
+ <a name="LinkedTreeList+length"></a>
602
+
603
+ ### linkedTreeList.length ⇒ <code>number</code>
604
+ Return the length of the list.
605
+
606
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
607
+ **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
608
+ <a name="LinkedTreeList+parent"></a>
609
+
610
+ ### linkedTreeList.parent ⇒ [<code>TreeLinker</code>](#TreeLinker)
611
+ Get the parent of this tree list.
612
+
613
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
614
+ <a name="LinkedTreeList+parent"></a>
615
+
616
+ ### linkedTreeList.parent
617
+ Set the parent of this tree list
618
+
619
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
620
+
621
+ | Param | Type | Description |
622
+ | --- | --- | --- |
623
+ | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
624
+
625
+ <a name="LinkedTreeList+rootParent"></a>
626
+
627
+ ### linkedTreeList.rootParent ⇒ [<code>TreeLinker</code>](#TreeLinker)
628
+ Return the root parent of the entire tree.
629
+
630
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
631
+ <a name="LinkedTreeList+initialize"></a>
632
+
633
+ ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
634
+ Initialize the inner list, should only run once.
635
+
636
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
637
+ **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
638
+
639
+ | Param | Type | Description |
640
+ | --- | --- | --- |
641
+ | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
642
+
643
+ <a name="LinkedTreeList+setChildren"></a>
644
+
645
+ ### linkedTreeList.setChildren(item, children)
646
+ Set the children on a parent item.
647
+
648
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
649
+
650
+ | Param | Type | Default | Description |
651
+ | --- | --- | --- | --- |
652
+ | item | [<code>TreeLinker</code>](#TreeLinker) | | The TreeLinker node that will be the parent of the children |
653
+ | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The LinkedTreeList which has the child nodes to use |
654
+
655
+ <a name="LinkedTreeList+insertAfter"></a>
656
+
657
+ ### linkedTreeList.insertAfter(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
658
+ Insert a new node (or data) after a node.
659
+
660
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
661
+ **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
662
+
663
+ | Param | Type | Description |
664
+ | --- | --- | --- |
665
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
666
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
667
+
668
+ <a name="LinkedTreeList+insertBefore"></a>
669
+
670
+ ### linkedTreeList.insertBefore(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
671
+ Insert a new node (or data) before a node.
672
+
673
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
674
+ **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
675
+
676
+ | Param | Type | Description |
677
+ | --- | --- | --- |
678
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
679
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
680
+
681
+ <a name="LinkedTreeList+append"></a>
682
+
683
+ ### linkedTreeList.append(node, after) ⇒ [<code>TreeLinker</code>](#TreeLinker)
684
+ Add a node (or data) after the given (or last) node in the list.
685
+
686
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
687
+ **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
688
+
689
+ | Param | Type | Description |
690
+ | --- | --- | --- |
691
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
692
+ | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
693
+
694
+ <a name="LinkedTreeList+prepend"></a>
695
+
696
+ ### linkedTreeList.prepend(node, before) ⇒ [<code>TreeLinker</code>](#TreeLinker)
697
+ Add a node (or data) before the given (or first) node in the list.
698
+
699
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
700
+ **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
701
+
702
+ | Param | Type | Description |
703
+ | --- | --- | --- |
704
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
705
+ | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
706
+
707
+ <a name="LinkedTreeList+remove"></a>
708
+
709
+ ### linkedTreeList.remove(node) ⇒ [<code>TreeLinker</code>](#TreeLinker)
710
+ Remove a linker from this linked list.
711
+
712
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
713
+ **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
714
+
715
+ | Param | Type | Description |
716
+ | --- | --- | --- |
717
+ | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
718
+
719
+ <a name="LinkedTreeList+reset"></a>
720
+
721
+ ### linkedTreeList.reset() ⇒ [<code>TreeLinker</code>](#TreeLinker)
722
+ Refresh all references and return head reference.
723
+
724
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
725
+ **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
726
+ <a name="LinkedTreeList+item"></a>
727
+
728
+ ### linkedTreeList.item(index) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
729
+ Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
730
+
731
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
732
+ **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
733
+
734
+ | Param | Type | Description |
735
+ | --- | --- | --- |
736
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
737
+
738
+ <a name="LinkedTreeList+forEach"></a>
739
+
740
+ ### linkedTreeList.forEach(callback, thisArg)
741
+ Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
742
+
743
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
744
+ **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
745
+
746
+ | Param | Type | Description |
747
+ | --- | --- | --- |
748
+ | callback | <code>forEachCallback</code> | The function to call for-each tree node |
749
+ | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
750
+
751
+ <a name="Linker"></a>
752
+
753
+ ## Linker ⇐ [<code>ArrayElement</code>](#ArrayElement)
754
+ Linker represents a node in a LinkedList.
755
+
756
+ **Kind**: global class
757
+ **Extends**: [<code>ArrayElement</code>](#ArrayElement)
758
+
759
+ * [Linker](#Linker) ⇐ [<code>ArrayElement</code>](#ArrayElement)
760
+ * [new Linker([nodeData])](#new_Linker_new)
761
+ * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
762
+
763
+ <a name="new_Linker_new"></a>
764
+
765
+ ### new Linker([nodeData])
766
+ Create the new Linker instance, provide the data and optionally give the next Linker.
767
+
768
+
769
+ | Param | Type | Default | Description |
770
+ | --- | --- | --- | --- |
771
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
772
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
773
+ | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
774
+
775
+ <a name="Linker.fromArray"></a>
776
+
777
+ ### Linker.fromArray([values], [classType]) ⇒ <code>Object</code>
778
+ Convert an array into Linker instances, return the head and tail Linkers.
779
+
780
+ **Kind**: static method of [<code>Linker</code>](#Linker)
781
+
782
+ | Param | Type | Default | Description |
783
+ | --- | --- | --- | --- |
784
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
785
+ | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
786
+
787
+ <a name="LinkedList"></a>
788
+
789
+ ## LinkedList ⇐ [<code>Arrayable</code>](#Arrayable)
790
+ LinkedList represents a collection stored as a LinkedList with next references.
791
+
792
+ **Kind**: global class
793
+ **Extends**: [<code>Arrayable</code>](#Arrayable)
794
+
795
+ * [LinkedList](#LinkedList) ⇐ [<code>Arrayable</code>](#Arrayable)
796
+ * [new LinkedList()](#new_LinkedList_new)
797
+ * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
798
+ * [.first](#LinkedList+first) ⇒ [<code>Linker</code>](#Linker)
799
+ * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
800
+ * [.length](#LinkedList+length) ⇒ <code>number</code>
801
+ * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
802
+ * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
803
+ * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
804
+ * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
805
+ * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
806
+ * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
807
+ * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
808
+ * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
809
+
810
+ <a name="new_LinkedList_new"></a>
811
+
812
+ ### new LinkedList()
813
+ Create the new LinkedList instance.
814
+
815
+ <a name="LinkedList+list"></a>
816
+
817
+ ### linkedList.list ⇒ [<code>Linker</code>](#Linker)
818
+ Retrieve a copy of the innerList used.
819
+
820
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
821
+ **Overrides**: [<code>list</code>](#Arrayable+list)
822
+ <a name="LinkedList+first"></a>
823
+
824
+ ### linkedList.first ⇒ [<code>Linker</code>](#Linker)
825
+ Retrieve the first Linker in the list.
826
+
827
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
828
+ **Overrides**: [<code>first</code>](#Arrayable+first)
829
+ <a name="LinkedList+last"></a>
830
+
831
+ ### linkedList.last ⇒ [<code>Linker</code>](#Linker)
832
+ Retrieve the last Linker in the list.
833
+
834
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
835
+ **Overrides**: [<code>last</code>](#Arrayable+last)
836
+ <a name="LinkedList+length"></a>
837
+
838
+ ### linkedList.length ⇒ <code>number</code>
839
+ Return the length of the list.
840
+
841
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
842
+ **Overrides**: [<code>length</code>](#Arrayable+length)
843
+ <a name="LinkedList+initialize"></a>
844
+
845
+ ### linkedList.initialize(initialList) ⇒ [<code>LinkedList</code>](#LinkedList)
846
+ Initialize the inner list, should only run once.
847
+
848
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
849
+ **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
850
+
851
+ | Param | Type | Description |
852
+ | --- | --- | --- |
853
+ | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
854
+
855
+ <a name="LinkedList+insertAfter"></a>
856
+
857
+ ### linkedList.insertAfter(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
858
+ Insert a new node (or data) after a node.
859
+
860
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
861
+ **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
862
+
863
+ | Param | Type | Description |
864
+ | --- | --- | --- |
865
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
866
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
867
+
868
+ <a name="LinkedList+insertBefore"></a>
869
+
870
+ ### linkedList.insertBefore(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
871
+ Insert a new node (or data) before a node.
872
+
873
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
874
+ **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
875
+
876
+ | Param | Type | Description |
877
+ | --- | --- | --- |
878
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
879
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
880
+
881
+ <a name="LinkedList+append"></a>
882
+
883
+ ### linkedList.append(node, after) ⇒ [<code>Linker</code>](#Linker)
884
+ Add a node (or data) after the given (or last) node in the list.
885
+
886
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
887
+ **Overrides**: [<code>append</code>](#Arrayable+append)
888
+
889
+ | Param | Type | Description |
890
+ | --- | --- | --- |
891
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
892
+ | after | [<code>Linker</code>](#Linker) | The existing last node |
893
+
894
+ <a name="LinkedList+prepend"></a>
895
+
896
+ ### linkedList.prepend(node, before) ⇒ [<code>Linker</code>](#Linker)
897
+ Add a node (or data) before the given (or first) node in the list.
898
+
899
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
900
+ **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
901
+
902
+ | Param | Type | Description |
903
+ | --- | --- | --- |
904
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
905
+ | before | [<code>Linker</code>](#Linker) | The existing first node |
906
+
907
+ <a name="LinkedList+remove"></a>
908
+
909
+ ### linkedList.remove(node) ⇒ [<code>Linker</code>](#Linker)
910
+ Remove a linker from this linked list.
911
+
912
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
913
+ **Overrides**: [<code>remove</code>](#Arrayable+remove)
914
+
915
+ | Param | Type | Description |
916
+ | --- | --- | --- |
917
+ | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
918
+
919
+ <a name="LinkedList+item"></a>
920
+
921
+ ### linkedList.item(index) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
922
+ Retrieve a Linker item from this list by numeric index, otherwise return null.
923
+
924
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
925
+ **Overrides**: [<code>item</code>](#Arrayable+item)
926
+
927
+ | Param | Type | Description |
928
+ | --- | --- | --- |
929
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
930
+
931
+ <a name="LinkedList+forEach"></a>
932
+
933
+ ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
934
+ Be able to run forEach on this LinkedList to iterate over the linkers.
935
+
936
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
937
+ **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
938
+
939
+ | Param | Type | Description |
940
+ | --- | --- | --- |
941
+ | callback | <code>forEachCallback</code> | The function to call for-each linker |
942
+ | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
943
+
944
+ <a name="DoublyLinkedList"></a>
945
+
946
+ ## DoublyLinkedList ⇐ [<code>LinkedList</code>](#LinkedList)
947
+ DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.
948
+
949
+ **Kind**: global class
950
+ **Extends**: [<code>LinkedList</code>](#LinkedList)
951
+
952
+ * [DoublyLinkedList](#DoublyLinkedList) ⇐ [<code>LinkedList</code>](#LinkedList)
953
+ * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
954
+ * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
955
+ * [.first](#DoublyLinkedList+first) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
956
+ * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
957
+ * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
958
+ * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
959
+ * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
960
+ * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
961
+ * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
962
+ * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
963
+ * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
964
+ * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
965
+ * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
966
+ * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
967
+
968
+ <a name="new_DoublyLinkedList_new"></a>
969
+
970
+ ### new DoublyLinkedList()
971
+ Create the new DoublyLinkedList instance.
972
+
973
+ <a name="DoublyLinkedList+list"></a>
974
+
975
+ ### doublyLinkedList.list ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
976
+ Retrieve a copy of the innerList used.
977
+
978
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
979
+ **Overrides**: [<code>list</code>](#LinkedList+list)
980
+ <a name="DoublyLinkedList+first"></a>
981
+
982
+ ### doublyLinkedList.first ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
983
+ Retrieve the first DoubleLinker in the list.
984
+
985
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
986
+ **Overrides**: [<code>first</code>](#LinkedList+first)
987
+ <a name="DoublyLinkedList+last"></a>
988
+
989
+ ### doublyLinkedList.last ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
990
+ Retrieve the last DoubleLinker in the list.
991
+
992
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
993
+ **Overrides**: [<code>last</code>](#LinkedList+last)
994
+ <a name="DoublyLinkedList+length"></a>
995
+
996
+ ### doublyLinkedList.length ⇒ <code>number</code>
997
+ Return the length of the list.
998
+
999
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1000
+ **Overrides**: [<code>length</code>](#LinkedList+length)
1001
+ <a name="DoublyLinkedList+initialize"></a>
1002
+
1003
+ ### doublyLinkedList.initialize(initialList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1004
+ Initialize the inner list, should only run once.
1005
+
1006
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1007
+ **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
1008
+
1009
+ | Param | Type | Description |
1010
+ | --- | --- | --- |
1011
+ | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
1012
+
1013
+ <a name="DoublyLinkedList+insertAfter"></a>
1014
+
1015
+ ### doublyLinkedList.insertAfter(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1016
+ Insert a new node (or data) after a node.
1017
+
1018
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1019
+ **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
1020
+
1021
+ | Param | Type | Description |
1022
+ | --- | --- | --- |
1023
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1024
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
1025
+
1026
+ <a name="DoublyLinkedList+insertBefore"></a>
1027
+
1028
+ ### doublyLinkedList.insertBefore(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1029
+ Insert a new node (or data) before a node.
1030
+
1031
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1032
+ **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
1033
+
1034
+ | Param | Type | Description |
1035
+ | --- | --- | --- |
1036
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
1037
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
1038
+
1039
+ <a name="DoublyLinkedList+append"></a>
1040
+
1041
+ ### doublyLinkedList.append(node, after) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1042
+ Add a node (or data) after the given (or last) node in the list.
1043
+
1044
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1045
+ **Overrides**: [<code>append</code>](#LinkedList+append)
1046
+
1047
+ | Param | Type | Description |
1048
+ | --- | --- | --- |
1049
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
1050
+ | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
1051
+
1052
+ <a name="DoublyLinkedList+prepend"></a>
1053
+
1054
+ ### doublyLinkedList.prepend(node, before) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1055
+ Add a node (or data) before the given (or first) node in the list.
1056
+
1057
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1058
+ **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
1059
+
1060
+ | Param | Type | Description |
1061
+ | --- | --- | --- |
1062
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
1063
+ | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
1064
+
1065
+ <a name="DoublyLinkedList+remove"></a>
1066
+
1067
+ ### doublyLinkedList.remove(node) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1068
+ Remove a linker from this linked list.
1069
+
1070
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1071
+ **Overrides**: [<code>remove</code>](#LinkedList+remove)
1072
+
1073
+ | Param | Type | Description |
1074
+ | --- | --- | --- |
1075
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
1076
+
1077
+ <a name="DoublyLinkedList+reset"></a>
1078
+
1079
+ ### doublyLinkedList.reset() ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
1080
+ Refresh all references and return head reference.
1081
+
1082
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1083
+ <a name="DoublyLinkedList+item"></a>
1084
+
1085
+ ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
1086
+ Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
1087
+
1088
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1089
+ **Overrides**: [<code>item</code>](#LinkedList+item)
1090
+
1091
+ | Param | Type | Description |
1092
+ | --- | --- | --- |
1093
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
1094
+
1095
+ <a name="DoublyLinkedList+forEach"></a>
1096
+
1097
+ ### doublyLinkedList.forEach(callback, thisArg)
1098
+ Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
1099
+
1100
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
1101
+ **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
1102
+
1103
+ | Param | Type | Description |
1104
+ | --- | --- | --- |
1105
+ | callback | <code>forEachCallback</code> | The function to call for-each double linker |
1106
+ | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
1107
+
1108
+ <a name="DoubleLinker"></a>
1109
+
1110
+ ## DoubleLinker ⇐ [<code>Linker</code>](#Linker)
1111
+ DoubleLinker represents a node in a DoublyLinkedList which is chained by next and prev.
1112
+
1113
+ **Kind**: global class
1114
+ **Extends**: [<code>Linker</code>](#Linker)
1115
+
1116
+ * [DoubleLinker](#DoubleLinker) ⇐ [<code>Linker</code>](#Linker)
1117
+ * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
1118
+ * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
1119
+
1120
+ <a name="new_DoubleLinker_new"></a>
1121
+
1122
+ ### new DoubleLinker([nodeData])
1123
+ Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
1124
+
1125
+
1126
+ | Param | Type | Default | Description |
1127
+ | --- | --- | --- | --- |
1128
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
1129
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1130
+ | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1131
+ | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
1132
+
1133
+ <a name="DoubleLinker.fromArray"></a>
1134
+
1135
+ ### DoubleLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
1136
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1137
+
1138
+ **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
1139
+
1140
+ | Param | Type | Default | Description |
1141
+ | --- | --- | --- | --- |
1142
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1143
+ | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
1144
+
1145
+ <a name="Arrayable"></a>
1146
+
1147
+ ## Arrayable
1148
+ Arrayable represents a collection stored as an array.
1149
+
1150
+ **Kind**: global class
1151
+
1152
+ * [Arrayable](#Arrayable)
1153
+ * [new Arrayable()](#new_Arrayable_new)
1154
+ * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1155
+ * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1156
+ * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1157
+ * [.length](#Arrayable+length) ⇒ <code>number</code>
1158
+ * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
1159
+ * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
1160
+ * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
1161
+ * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
1162
+ * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
1163
+ * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1164
+ * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1165
+ * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
1166
+
1167
+ <a name="new_Arrayable_new"></a>
1168
+
1169
+ ### new Arrayable()
1170
+ Create the new Arrayable instance, configure the Arrayable class.
1171
+
1172
+ <a name="Arrayable+list"></a>
1173
+
1174
+ ### arrayable.list ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
1175
+ Retrieve a copy of the innerList used.
1176
+
1177
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1178
+ <a name="Arrayable+first"></a>
1179
+
1180
+ ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
1181
+ Retrieve the first Element from the Arrayable
1182
+
1183
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1184
+ <a name="Arrayable+last"></a>
1185
+
1186
+ ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
1187
+ Retrieve the last Element from the Arrayable
1188
+
1189
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1190
+ <a name="Arrayable+length"></a>
1191
+
1192
+ ### arrayable.length ⇒ <code>number</code>
1193
+ Return the length of the list.
1194
+
1195
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
1196
+ <a name="Arrayable+initialize"></a>
1197
+
1198
+ ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
1199
+ Initialize the inner list, should only run once.
1200
+
1201
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1202
+
1203
+ | Param | Type | Description |
1204
+ | --- | --- | --- |
1205
+ | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
1206
+
1207
+ <a name="Arrayable+insertAfter"></a>
1208
+
1209
+ ### arrayable.insertAfter(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1210
+ Insert a new node (or data) after a node.
1211
+
1212
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1213
+
1214
+ | Param | Type | Description |
1215
+ | --- | --- | --- |
1216
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1217
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
1218
+
1219
+ <a name="Arrayable+insertBefore"></a>
1220
+
1221
+ ### arrayable.insertBefore(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
1222
+ Insert a new node (or data) before a node.
1223
+
1224
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1225
+
1226
+ | Param | Type | Description |
1227
+ | --- | --- | --- |
1228
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
1229
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
1230
+
1231
+ <a name="Arrayable+append"></a>
1232
+
1233
+ ### arrayable.append(node, after) ⇒ [<code>Arrayable</code>](#Arrayable)
1234
+ Add a node (or data) after the given (or last) node in the list.
1235
+
1236
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1237
+
1238
+ | Param | Type | Description |
1239
+ | --- | --- | --- |
1240
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
1241
+ | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
1242
+
1243
+ <a name="Arrayable+prepend"></a>
1244
+
1245
+ ### arrayable.prepend(node, before) ⇒ [<code>Arrayable</code>](#Arrayable)
1246
+ Add a node (or data) before the given (or first) node in the list.
1247
+
1248
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1249
+
1250
+ | Param | Type | Description |
1251
+ | --- | --- | --- |
1252
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
1253
+ | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
1254
+
1255
+ <a name="Arrayable+remove"></a>
1256
+
1257
+ ### arrayable.remove(node) ⇒ [<code>ArrayElement</code>](#ArrayElement)
1258
+ Remove an element from this arrayable.
1259
+
1260
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1261
+
1262
+ | Param | Type | Description |
1263
+ | --- | --- | --- |
1264
+ | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
1265
+
1266
+ <a name="Arrayable+item"></a>
1267
+
1268
+ ### arrayable.item(index) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
1269
+ Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
1270
+
1271
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1272
+
1273
+ | Param | Type | Description |
1274
+ | --- | --- | --- |
1275
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
1276
+
1277
+ <a name="Arrayable+forEach"></a>
1278
+
1279
+ ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
1280
+ Be able to run forEach on this Arrayable to iterate over the elements.
1281
+
1282
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
1283
+
1284
+ | Param | Type | Description |
1285
+ | --- | --- | --- |
1286
+ | callback | <code>forEachCallback</code> | The function to call for-each element |
1287
+ | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
1288
+
1289
+ <a name="ArrayElement"></a>
1290
+
1291
+ ## ArrayElement
1292
+ Element represents a node in an Arrayable.
1293
+
1294
+ **Kind**: global class
1295
+
1296
+ * [ArrayElement](#ArrayElement)
1297
+ * [new ArrayElement([data])](#new_ArrayElement_new)
1298
+ * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
1299
+
1300
+ <a name="new_ArrayElement_new"></a>
1301
+
1302
+ ### new ArrayElement([data])
1303
+ Create the new Element instance, provide the data and optionally configure the type of Element.
1304
+
1305
+
1306
+ | Param | Type | Default | Description |
1307
+ | --- | --- | --- | --- |
1308
+ | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
1309
+
1310
+ <a name="ArrayElement.fromArray"></a>
1311
+
1312
+ ### ArrayElement.fromArray([values], [classType]) ⇒ <code>Object</code>
1313
+ Convert an array into Element instances, return the head and tail Elements.
1314
+
1315
+ **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
1316
+
1317
+ | Param | Type | Default | Description |
1318
+ | --- | --- | --- | --- |
1319
+ | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
1320
+ | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
1321
+
1322
+ <a name="Stackable"></a>
1323
+
1324
+ ## Stackable ⇒ [<code>Stackable</code>](#Stackable)
1325
+ Make a new Stackable from the data given if it is not already a valid Stackable.
1326
+
1327
+ **Kind**: global variable
1328
+
1329
+ | Param | Type | Default | Description |
1330
+ | --- | --- | --- | --- |
1331
+ | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | | Return a valid Stackable instance from given data, or even an already valid one. |
1332
+ | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
1333
+
1334
+
1335
+ * [Stackable](#Stackable) ⇒ [<code>Stackable</code>](#Stackable)
1336
+ * [new Stackable([stackData])](#new_Stackable_new)
1337
+ * _instance_
1338
+ * [.task](#Stackable+task) ⇒ <code>\*</code>
1339
+ * [.run()](#Stackable+run) ⇒ <code>\*</code>
1340
+ * _static_
1341
+ * [.fromArray([values], [classType])](#Stackable.fromArray) ⇒ <code>Object</code>
1342
+
1343
+ <a name="new_Stackable_new"></a>
1344
+
1345
+ ### new Stackable([stackData])
1346
+ Create a stackable item that can be used in a stack.
1347
+
1348
+
1349
+ | Param | Type | Default | Description |
1350
+ | --- | --- | --- | --- |
1351
+ | [stackData] | <code>Object</code> | <code>{}</code> | |
1352
+ | [stackData.task] | <code>\*</code> | <code></code> | The data to be stored in this stackable |
1353
+ | [stackData.next] | [<code>Stackable</code>](#Stackable) \| <code>null</code> | <code></code> | The reference to the next stackable if any |
1354
+ | [stackData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the stackable is ready to run |
1355
+
1356
+ <a name="Stackable+task"></a>
1357
+
1358
+ ### stackable.task ⇒ <code>\*</code>
1359
+ Retrieve the data which should be formed as a task.
1360
+
1361
+ **Kind**: instance property of [<code>Stackable</code>](#Stackable)
1362
+ <a name="Stackable+run"></a>
1363
+
1364
+ ### stackable.run() ⇒ <code>\*</code>
1365
+ Run the stacked task.
1366
+
1367
+ **Kind**: instance method of [<code>Stackable</code>](#Stackable)
1368
+ <a name="Stackable.fromArray"></a>
1369
+
1370
+ ### Stackable.fromArray([values], [classType]) ⇒ <code>Object</code>
1371
+ Convert an array into Stackable instances, return the head and tail Stackables.
1372
+
1373
+ **Kind**: static method of [<code>Stackable</code>](#Stackable)
1374
+
1375
+ | Param | Type | Default | Description |
1376
+ | --- | --- | --- | --- |
1377
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of stackable linkers. |
1378
+ | [classType] | <code>IsLinker</code> | <code>Stackable</code> | Provide the type of IsLinker to use. |
1379
+
1380
+ <a name="Stack"></a>
1381
+
1382
+ ## Stack ⇒ [<code>Stack</code>](#Stack)
1383
+ Convert an array to a Stack.
1384
+
1385
+ **Kind**: global variable
1386
+
1387
+ | Param | Type | Description |
1388
+ | --- | --- | --- |
1389
+ | values | <code>Array</code> | An array of values which will be converted to stackables in this queue |
1390
+ | stackableClass | [<code>Stackable</code>](#Stackable) | The class to use for each stackable |
1391
+ | listClass | [<code>Stack</code>](#Stack) \| <code>Iterable</code> | The class to use to manage the stackables |
1392
+
1393
+
1394
+ * [Stack](#Stack) ⇒ [<code>Stack</code>](#Stack)
1395
+ * [new Stack(stackedList, listClass, stackableClass)](#new_Stack_new)
1396
+ * [.empty()](#Stack+empty) ⇒ <code>boolean</code>
1397
+ * [.top()](#Stack+top) ⇒ [<code>Stackable</code>](#Stackable)
1398
+ * [.pop()](#Stack+pop) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1399
+ * [.push(stackable)](#Stack+push)
1400
+ * [.remove()](#Stack+remove) ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1401
+ * [.size()](#Stack+size) ⇒ <code>number</code>
1402
+
1403
+ <a name="new_Stack_new"></a>
1404
+
1405
+ ### new Stack(stackedList, listClass, stackableClass)
1406
+ Instantiate the state with the starter stacked list.
1407
+
1408
+
1409
+ | Param | Type | Default |
1410
+ | --- | --- | --- |
1411
+ | stackedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> |
1412
+ | listClass | <code>IsArrayable</code> | |
1413
+ | stackableClass | [<code>Stackable</code>](#Stackable) | |
1414
+
1415
+ <a name="Stack+empty"></a>
1416
+
1417
+ ### stack.empty() ⇒ <code>boolean</code>
1418
+ Return true if the stack is empty (there are no tasks in the stacked list)
1419
+
1420
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1421
+ <a name="Stack+top"></a>
1422
+
1423
+ ### stack.top() ⇒ [<code>Stackable</code>](#Stackable)
1424
+ Take a look at the next stacked task
1425
+
1426
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1427
+ <a name="Stack+pop"></a>
1428
+
1429
+ ### stack.pop() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1430
+ Remove the next stacked task and return it.
1431
+
1432
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1433
+ <a name="Stack+push"></a>
1434
+
1435
+ ### stack.push(stackable)
1436
+ Push a stackable task to the top of the stack.
1437
+
1438
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1439
+
1440
+ | Param | Type | Description |
1441
+ | --- | --- | --- |
1442
+ | stackable | [<code>Stackable</code>](#Stackable) \| <code>\*</code> | Add a new stackable to the top of the stack |
1443
+
1444
+ <a name="Stack+remove"></a>
1445
+
1446
+ ### stack.remove() ⇒ [<code>Stackable</code>](#Stackable) \| <code>null</code>
1447
+ Remove the next stacked task and return it.
1448
+
1449
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1450
+ <a name="Stack+size"></a>
1451
+
1452
+ ### stack.size() ⇒ <code>number</code>
1453
+ Get the size of the current stack.
1454
+
1455
+ **Kind**: instance method of [<code>Stack</code>](#Stack)
1456
+ <a name="Queueable"></a>
1457
+
1458
+ ## Queueable ⇒ [<code>Queueable</code>](#Queueable)
1459
+ Make a new Queueable from the data given if it is not already a valid Queueable.
1460
+
1461
+ **Kind**: global variable
1462
+
1463
+ | Param | Type | Default | Description |
1464
+ | --- | --- | --- | --- |
1465
+ | queueable | [<code>Queueable</code>](#Queueable) \| <code>\*</code> | | Return a valid Queueable instance from given data, or even an already valid one. |
1466
+ | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
1467
+
1468
+
1469
+ * [Queueable](#Queueable) ⇒ [<code>Queueable</code>](#Queueable)
1470
+ * [new Queueable([queueableData])](#new_Queueable_new)
1471
+ * _instance_
1472
+ * [.isReady](#Queueable+isReady) ⇒ <code>boolean</code>
1473
+ * [.task](#Queueable+task) ⇒ <code>\*</code>
1474
+ * [.markCompleted(completeResponse)](#Queueable+markCompleted) ⇒ <code>completeResponse</code>
1475
+ * [.run()](#Queueable+run) ⇒ <code>completeResponse</code>
1476
+ * _static_
1477
+ * [.fromArray(values, [classType])](#Queueable.fromArray) ⇒ <code>Object</code>
1478
+
1479
+ <a name="new_Queueable_new"></a>
1480
+
1481
+ ### new Queueable([queueableData])
1482
+ Create a queueable item that can be used in a queue.
1483
+
1484
+
1485
+ | Param | Type | Default | Description |
1486
+ | --- | --- | --- | --- |
1487
+ | [queueableData] | <code>Object</code> | <code>{}</code> | |
1488
+ | [queueableData.task] | <code>\*</code> | <code></code> | The data to be stored in this queueable |
1489
+ | [queueableData.next] | [<code>Queueable</code>](#Queueable) \| <code>null</code> | <code></code> | The reference to the next queueable if any |
1490
+ | [queueableData.ready] | <code>boolean</code> \| <code>function</code> | <code>false</code> | Indicate if the queueable is ready to run |
1491
+
1492
+ <a name="Queueable+isReady"></a>
1493
+
1494
+ ### queueable.isReady ⇒ <code>boolean</code>
1495
+ Check ready state.
1496
+
1497
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
1498
+ <a name="Queueable+task"></a>
1499
+
1500
+ ### queueable.task ⇒ <code>\*</code>
1501
+ Retrieve the data which should be formed as a task.
1502
+
1503
+ **Kind**: instance property of [<code>Queueable</code>](#Queueable)
1504
+ <a name="Queueable+markCompleted"></a>
1505
+
1506
+ ### queueable.markCompleted(completeResponse) ⇒ <code>completeResponse</code>
1507
+ Set this queueable as completed.
1508
+
1509
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
1510
+
1511
+ | Param | Type | Default | Description |
1512
+ | --- | --- | --- | --- |
1513
+ | completeResponse | <code>Object</code> | | |
1514
+ | [completeResponse.success] | <code>\*</code> | <code>true</code> | Indicate when the task failed (use false) or give a success message |
1515
+ | [completeResponse.error] | <code>\*</code> | <code>false</code> | Indicate a task was error-free (use false) or give an error message |
1516
+ | [completeResponse.context] | <code>\*</code> | <code></code> | Provide additional data in the response |
1517
+
1518
+ <a name="Queueable+run"></a>
1519
+
1520
+ ### queueable.run() ⇒ <code>completeResponse</code>
1521
+ Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
1522
+
1523
+ **Kind**: instance method of [<code>Queueable</code>](#Queueable)
1524
+ <a name="Queueable.fromArray"></a>
1525
+
1526
+ ### Queueable.fromArray(values, [classType]) ⇒ <code>Object</code>
1527
+ Convert an array into Queueable instances, return the head and tail Queueables.
1528
+
1529
+ **Kind**: static method of [<code>Queueable</code>](#Queueable)
1530
+
1531
+ | Param | Type | Default | Description |
1532
+ | --- | --- | --- | --- |
1533
+ | values | <code>Array</code> | | Provide an array of data that will be converted to a chain of queueable linkers. |
1534
+ | [classType] | <code>IsLinker</code> | <code>Queueable</code> | Provide the type of IsLinker to use. |
1535
+
1536
+ <a name="Queue"></a>
1537
+
1538
+ ## Queue ⇒ [<code>Queue</code>](#Queue)
1539
+ Convert an array to a Queue.
1540
+
1541
+ **Kind**: global variable
1542
+
1543
+ | Param | Type | Description |
1544
+ | --- | --- | --- |
1545
+ | values | <code>Array</code> | An array of values which will be converted to queueables in this queue |
1546
+ | queueableClass | [<code>Queueable</code>](#Queueable) | The class to use for each queueable |
1547
+ | listClass | [<code>Queue</code>](#Queue) \| <code>Iterable</code> | The class to use to manage the queueables |
1548
+
1549
+
1550
+ * [Queue](#Queue) ⇒ [<code>Queue</code>](#Queue)
1551
+ * [new Queue(queuedList, listClass, queueableClass)](#new_Queue_new)
1552
+ * [.dequeue()](#Queue+dequeue) ⇒ <code>completeResponse</code> \| <code>\*</code>
1553
+ * [.empty()](#Queue+empty) ⇒ <code>boolean</code>
1554
+ * [.enqueue(queueable)](#Queue+enqueue)
1555
+ * [.peek()](#Queue+peek) ⇒ [<code>Queueable</code>](#Queueable)
1556
+ * [.remove()](#Queue+remove) ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
1557
+ * [.size()](#Queue+size) ⇒ <code>number</code>
1558
+
1559
+ <a name="new_Queue_new"></a>
1560
+
1561
+ ### new Queue(queuedList, listClass, queueableClass)
1562
+ Instantiate the queue with the given queue list.
1563
+
1564
+
1565
+ | Param | Type | Default | Description |
1566
+ | --- | --- | --- | --- |
1567
+ | queuedList | <code>Iterable</code> \| [<code>LinkedList</code>](#LinkedList) | <code></code> | Give the list of queueables to start in this queue. |
1568
+ | listClass | <code>IsArrayable</code> | | |
1569
+ | queueableClass | [<code>Queueable</code>](#Queueable) | | |
1570
+
1571
+ <a name="Queue+dequeue"></a>
1572
+
1573
+ ### queue.dequeue() ⇒ <code>completeResponse</code> \| <code>\*</code>
1574
+ Take a queued task from the front of the queue and run it if ready.
1575
+
1576
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1577
+ <a name="Queue+empty"></a>
1578
+
1579
+ ### queue.empty() ⇒ <code>boolean</code>
1580
+ Return true if the queue is empty (there are no tasks in the queue list)
1581
+
1582
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1583
+ <a name="Queue+enqueue"></a>
1584
+
1585
+ ### queue.enqueue(queueable)
1586
+ Add a queued task to the end of the queue
1587
+
1588
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1589
+
1590
+ | Param | Type | Description |
1591
+ | --- | --- | --- |
1592
+ | queueable | [<code>Queueable</code>](#Queueable) | Add a new queueable to the end of the queue |
1593
+
1594
+ <a name="Queue+peek"></a>
1595
+
1596
+ ### queue.peek() ⇒ [<code>Queueable</code>](#Queueable)
1597
+ Take a look at the next queued task
1598
+
1599
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1600
+ <a name="Queue+remove"></a>
1601
+
1602
+ ### queue.remove() ⇒ [<code>Queueable</code>](#Queueable) \| <code>null</code>
1603
+ Remove the next queued item and return it.
1604
+
1605
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1606
+ <a name="Queue+size"></a>
1607
+
1608
+ ### queue.size() ⇒ <code>number</code>
1609
+ Get the length of the current queue.
1610
+
1611
+ **Kind**: instance method of [<code>Queue</code>](#Queue)
1612
+ <a name="TreeLinker"></a>
1613
+
1614
+ ## TreeLinker ⇒ [<code>TreeLinker</code>](#TreeLinker)
1615
+ Make a new DoubleLinker from the data given if it is not already a valid Linker.
1616
+
1617
+ **Kind**: global variable
1618
+
1619
+ | Param | Type | Default | Description |
1620
+ | --- | --- | --- | --- |
1621
+ | linker | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | | Return a valid TreeLinker instance from given data, or even an already valid one. |
1622
+ | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
1623
+
1624
+
1625
+ * [TreeLinker](#TreeLinker) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1626
+ * [new TreeLinker([settings], listClass)](#new_TreeLinker_new)
1627
+ * _instance_
1628
+ * [.childrenFromArray(children, listClass)](#TreeLinker+childrenFromArray) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
1629
+ * _static_
1630
+ * [.fromArray([values], [classType])](#TreeLinker.fromArray) ⇒ <code>Object</code>
1631
+
1632
+ <a name="new_TreeLinker_new"></a>
1633
+
1634
+ ### new TreeLinker([settings], listClass)
1635
+ Create the new TreeLinker instance, provide the data and optionally set references for next, prev, parent, or children.
1636
+
1637
+
1638
+ | Param | Type | Default | Description |
1639
+ | --- | --- | --- | --- |
1640
+ | [settings] | <code>Object</code> | <code>{}</code> | |
1641
+ | [settings.data] | <code>\*</code> | <code></code> | The data to be stored in this tree node |
1642
+ | [settings.next] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the next linker if any |
1643
+ | [settings.prev] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to the previous linker if any |
1644
+ | [settings.children] | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The references to child linkers if any |
1645
+ | [settings.parent] | [<code>TreeLinker</code>](#TreeLinker) | <code></code> | The reference to a parent linker if any |
1646
+ | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
1647
+
1648
+ <a name="TreeLinker+childrenFromArray"></a>
1649
+
1650
+ ### treeLinker.childrenFromArray(children, listClass) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList) \| <code>null</code>
1651
+ Create the children for this tree from an array.
1652
+
1653
+ **Kind**: instance method of [<code>TreeLinker</code>](#TreeLinker)
1654
+
1655
+ | Param | Type | Default | Description |
1656
+ | --- | --- | --- | --- |
1657
+ | children | <code>Array</code> \| <code>null</code> | <code></code> | Provide an array of data / linker references to be children of this tree node. |
1658
+ | listClass | <code>IsArrayable.&lt;IsTreeNode&gt;</code> | | Give the type of list to use for storing the children |
1659
+
1660
+ <a name="TreeLinker.fromArray"></a>
1661
+
1662
+ ### TreeLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
1663
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
1664
+
1665
+ **Kind**: static method of [<code>TreeLinker</code>](#TreeLinker)
1666
+
1667
+ | Param | Type | Default | Description |
1668
+ | --- | --- | --- | --- |
1669
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of tree-linkers. |
1670
+ | [classType] | <code>IsTreeNode</code> | <code>TreeLinker</code> | Provide the type of IsTreeNode to use. |
1671
+
1672
+ <a name="LinkedTreeList"></a>
1673
+
1674
+ ## LinkedTreeList ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1675
+ Convert an array into a LinkedTreeList instance, return the new instance.
1676
+
1677
+ **Kind**: global variable
1678
+
1679
+ | Param | Type | Default | Description |
1680
+ | --- | --- | --- | --- |
1681
+ | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to nodes in this tree-list |
1682
+ | [linkerClass] | [<code>TreeLinker</code>](#TreeLinker) | <code>TreeLinker</code> | The class to use for each node |
1683
+ | [classType] | [<code>IsArrayable.&lt;TreeLinker&gt;</code>](#TreeLinker) | <code>LinkedTreeList</code> | Provide the type of IsArrayable to use. |
1684
+
1685
+
1686
+ * [LinkedTreeList](#LinkedTreeList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1687
+ * [new LinkedTreeList()](#new_LinkedTreeList_new)
1688
+ * [.list](#LinkedTreeList+list) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1689
+ * [.first](#LinkedTreeList+first) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1690
+ * [.last](#LinkedTreeList+last) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1691
+ * [.length](#LinkedTreeList+length) ⇒ <code>number</code>
1692
+ * [.parent](#LinkedTreeList+parent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1693
+ * [.parent](#LinkedTreeList+parent)
1694
+ * [.rootParent](#LinkedTreeList+rootParent) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1695
+ * [.initialize(initialList)](#LinkedTreeList+initialize) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1696
+ * [.setChildren(item, children)](#LinkedTreeList+setChildren)
1697
+ * [.insertAfter(node, newNode)](#LinkedTreeList+insertAfter) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1698
+ * [.insertBefore(node, newNode)](#LinkedTreeList+insertBefore) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1699
+ * [.append(node, after)](#LinkedTreeList+append) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1700
+ * [.prepend(node, before)](#LinkedTreeList+prepend) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1701
+ * [.remove(node)](#LinkedTreeList+remove) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1702
+ * [.reset()](#LinkedTreeList+reset) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1703
+ * [.item(index)](#LinkedTreeList+item) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
1704
+ * [.forEach(callback, thisArg)](#LinkedTreeList+forEach)
1705
+
1706
+ <a name="new_LinkedTreeList_new"></a>
1707
+
1708
+ ### new LinkedTreeList()
1709
+ Create the new LinkedTreeList instance, configure the list class.
1710
+
1711
+ <a name="LinkedTreeList+list"></a>
1712
+
1713
+ ### linkedTreeList.list ⇒ [<code>TreeLinker</code>](#TreeLinker)
1714
+ Retrieve a copy of the innerList used.
1715
+
1716
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1717
+ **Overrides**: [<code>list</code>](#DoublyLinkedList+list)
1718
+ <a name="LinkedTreeList+first"></a>
1719
+
1720
+ ### linkedTreeList.first ⇒ [<code>TreeLinker</code>](#TreeLinker)
1721
+ Retrieve the first TreeLinker in the list.
1722
+
1723
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1724
+ **Overrides**: [<code>first</code>](#DoublyLinkedList+first)
1725
+ <a name="LinkedTreeList+last"></a>
1726
+
1727
+ ### linkedTreeList.last ⇒ [<code>TreeLinker</code>](#TreeLinker)
1728
+ Retrieve the last TreeLinker in the list.
1729
+
1730
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1731
+ **Overrides**: [<code>last</code>](#DoublyLinkedList+last)
1732
+ <a name="LinkedTreeList+length"></a>
1733
+
1734
+ ### linkedTreeList.length ⇒ <code>number</code>
1735
+ Return the length of the list.
1736
+
1737
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1738
+ **Overrides**: [<code>length</code>](#DoublyLinkedList+length)
1739
+ <a name="LinkedTreeList+parent"></a>
1740
+
1741
+ ### linkedTreeList.parent ⇒ [<code>TreeLinker</code>](#TreeLinker)
1742
+ Get the parent of this tree list.
1743
+
1744
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1745
+ <a name="LinkedTreeList+parent"></a>
1746
+
1747
+ ### linkedTreeList.parent
1748
+ Set the parent of this tree list
1749
+
1750
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1751
+
1752
+ | Param | Type | Description |
1753
+ | --- | --- | --- |
1754
+ | parent | [<code>TreeLinker</code>](#TreeLinker) | The new node to use as the parent for this group of children |
1755
+
1756
+ <a name="LinkedTreeList+rootParent"></a>
1757
+
1758
+ ### linkedTreeList.rootParent ⇒ [<code>TreeLinker</code>](#TreeLinker)
1759
+ Return the root parent of the entire tree.
1760
+
1761
+ **Kind**: instance property of [<code>LinkedTreeList</code>](#LinkedTreeList)
1762
+ <a name="LinkedTreeList+initialize"></a>
1763
+
1764
+ ### linkedTreeList.initialize(initialList) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1765
+ Initialize the inner list, should only run once.
1766
+
1767
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1768
+ **Overrides**: [<code>initialize</code>](#DoublyLinkedList+initialize)
1769
+
1770
+ | Param | Type | Description |
1771
+ | --- | --- | --- |
1772
+ | initialList | [<code>TreeLinker</code>](#TreeLinker) | Give the list of tree-linkers to start in this linked-tree-list. |
1773
+
1774
+ <a name="LinkedTreeList+setChildren"></a>
1775
+
1776
+ ### linkedTreeList.setChildren(item, children)
1777
+ Set the children on a parent item.
1778
+
1779
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1780
+
1781
+ | Param | Type | Default | Description |
1782
+ | --- | --- | --- | --- |
1783
+ | item | [<code>TreeLinker</code>](#TreeLinker) | | The TreeLinker node that will be the parent of the children |
1784
+ | children | [<code>LinkedTreeList</code>](#LinkedTreeList) | <code></code> | The LinkedTreeList which has the child nodes to use |
1785
+
1786
+ <a name="LinkedTreeList+insertAfter"></a>
1787
+
1788
+ ### linkedTreeList.insertAfter(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1789
+ Insert a new node (or data) after a node.
1790
+
1791
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1792
+ **Overrides**: [<code>insertAfter</code>](#DoublyLinkedList+insertAfter)
1793
+
1794
+ | Param | Type | Description |
1795
+ | --- | --- | --- |
1796
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
1797
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go after the existing node |
1798
+
1799
+ <a name="LinkedTreeList+insertBefore"></a>
1800
+
1801
+ ### linkedTreeList.insertBefore(node, newNode) ⇒ [<code>LinkedTreeList</code>](#LinkedTreeList)
1802
+ Insert a new node (or data) before a node.
1803
+
1804
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1805
+ **Overrides**: [<code>insertBefore</code>](#DoublyLinkedList+insertBefore)
1806
+
1807
+ | Param | Type | Description |
1808
+ | --- | --- | --- |
1809
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The existing node as reference |
1810
+ | newNode | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to go before the existing node |
1811
+
1812
+ <a name="LinkedTreeList+append"></a>
1813
+
1814
+ ### linkedTreeList.append(node, after) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1815
+ Add a node (or data) after the given (or last) node in the list.
1816
+
1817
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1818
+ **Overrides**: [<code>append</code>](#DoublyLinkedList+append)
1819
+
1820
+ | Param | Type | Description |
1821
+ | --- | --- | --- |
1822
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the end of the list |
1823
+ | after | [<code>TreeLinker</code>](#TreeLinker) | The existing last node |
1824
+
1825
+ <a name="LinkedTreeList+prepend"></a>
1826
+
1827
+ ### linkedTreeList.prepend(node, before) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1828
+ Add a node (or data) before the given (or first) node in the list.
1829
+
1830
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1831
+ **Overrides**: [<code>prepend</code>](#DoublyLinkedList+prepend)
1832
+
1833
+ | Param | Type | Description |
1834
+ | --- | --- | --- |
1835
+ | node | [<code>TreeLinker</code>](#TreeLinker) \| <code>\*</code> | The new node to add to the start of the list |
1836
+ | before | [<code>TreeLinker</code>](#TreeLinker) | The existing first node |
1837
+
1838
+ <a name="LinkedTreeList+remove"></a>
1839
+
1840
+ ### linkedTreeList.remove(node) ⇒ [<code>TreeLinker</code>](#TreeLinker)
1841
+ Remove a linker from this linked list.
1842
+
1843
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1844
+ **Overrides**: [<code>remove</code>](#DoublyLinkedList+remove)
1845
+
1846
+ | Param | Type | Description |
1847
+ | --- | --- | --- |
1848
+ | node | [<code>TreeLinker</code>](#TreeLinker) | The node we wish to remove (and it will be returned after removal) |
1849
+
1850
+ <a name="LinkedTreeList+reset"></a>
1851
+
1852
+ ### linkedTreeList.reset() ⇒ [<code>TreeLinker</code>](#TreeLinker)
1853
+ Refresh all references and return head reference.
1854
+
1855
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1856
+ **Overrides**: [<code>reset</code>](#DoublyLinkedList+reset)
1857
+ <a name="LinkedTreeList+item"></a>
1858
+
1859
+ ### linkedTreeList.item(index) ⇒ [<code>TreeLinker</code>](#TreeLinker) \| <code>null</code>
1860
+ Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
1861
+
1862
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1863
+ **Overrides**: [<code>item</code>](#DoublyLinkedList+item)
1864
+
1865
+ | Param | Type | Description |
1866
+ | --- | --- | --- |
1867
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
1868
+
1869
+ <a name="LinkedTreeList+forEach"></a>
1870
+
1871
+ ### linkedTreeList.forEach(callback, thisArg)
1872
+ Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
1873
+
1874
+ **Kind**: instance method of [<code>LinkedTreeList</code>](#LinkedTreeList)
1875
+ **Overrides**: [<code>forEach</code>](#DoublyLinkedList+forEach)
1876
+
1877
+ | Param | Type | Description |
1878
+ | --- | --- | --- |
1879
+ | callback | <code>forEachCallback</code> | The function to call for-each tree node |
1880
+ | thisArg | [<code>LinkedTreeList</code>](#LinkedTreeList) | Optional, 'this' reference |
1881
+
1882
+ <a name="Linker"></a>
1883
+
1884
+ ## Linker ⇒ [<code>Linker</code>](#Linker)
1885
+ Make a new Linker from the data given if it is not already a valid Linker.
1886
+
1887
+ **Kind**: global variable
1888
+
1889
+ | Param | Type | Default | Description |
1890
+ | --- | --- | --- | --- |
1891
+ | linker | [<code>Linker</code>](#Linker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
1892
+ | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
1893
+
1894
+
1895
+ * [Linker](#Linker) ⇒ [<code>Linker</code>](#Linker)
1896
+ * [new Linker([nodeData])](#new_Linker_new)
1897
+ * [.fromArray([values], [classType])](#Linker.fromArray) ⇒ <code>Object</code>
1898
+
1899
+ <a name="new_Linker_new"></a>
1900
+
1901
+ ### new Linker([nodeData])
1902
+ Create the new Linker instance, provide the data and optionally give the next Linker.
1903
+
1904
+
1905
+ | Param | Type | Default | Description |
1906
+ | --- | --- | --- | --- |
1907
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
1908
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
1909
+ | [nodeData.next] | [<code>Linker</code>](#Linker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
1910
+
1911
+ <a name="Linker.fromArray"></a>
1912
+
1913
+ ### Linker.fromArray([values], [classType]) ⇒ <code>Object</code>
1914
+ Convert an array into Linker instances, return the head and tail Linkers.
1915
+
1916
+ **Kind**: static method of [<code>Linker</code>](#Linker)
1917
+
1918
+ | Param | Type | Default | Description |
1919
+ | --- | --- | --- | --- |
1920
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
1921
+ | [classType] | <code>IsLinker</code> | <code>Linker</code> | Provide the type of IsLinker to use. |
1922
+
1923
+ <a name="LinkedList"></a>
1924
+
1925
+ ## LinkedList ⇒ [<code>LinkedList</code>](#LinkedList)
1926
+ Convert an array to a LinkedList.
1927
+
1928
+ **Kind**: global variable
1929
+
1930
+ | Param | Type | Default | Description |
1931
+ | --- | --- | --- | --- |
1932
+ | values | <code>Array</code> | | An array of values which will be converted to linkers in this linked-list |
1933
+ | linkerClass | <code>IsLinker</code> | | The class to use for each linker |
1934
+ | [classType] | [<code>IsArrayable.&lt;Linker&gt;</code>](#Linker) | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
1935
+
1936
+
1937
+ * [LinkedList](#LinkedList) ⇒ [<code>LinkedList</code>](#LinkedList)
1938
+ * [new LinkedList()](#new_LinkedList_new)
1939
+ * [.list](#LinkedList+list) ⇒ [<code>Linker</code>](#Linker)
1940
+ * [.first](#LinkedList+first) ⇒ [<code>Linker</code>](#Linker)
1941
+ * [.last](#LinkedList+last) ⇒ [<code>Linker</code>](#Linker)
1942
+ * [.length](#LinkedList+length) ⇒ <code>number</code>
1943
+ * [.initialize(initialList)](#LinkedList+initialize) ⇒ [<code>LinkedList</code>](#LinkedList)
1944
+ * [.insertAfter(node, newNode)](#LinkedList+insertAfter) ⇒ [<code>LinkedList</code>](#LinkedList)
1945
+ * [.insertBefore(node, newNode)](#LinkedList+insertBefore) ⇒ [<code>LinkedList</code>](#LinkedList)
1946
+ * [.append(node, after)](#LinkedList+append) ⇒ [<code>Linker</code>](#Linker)
1947
+ * [.prepend(node, before)](#LinkedList+prepend) ⇒ [<code>Linker</code>](#Linker)
1948
+ * [.remove(node)](#LinkedList+remove) ⇒ [<code>Linker</code>](#Linker)
1949
+ * [.item(index)](#LinkedList+item) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
1950
+ * [.forEach(callback, thisArg)](#LinkedList+forEach) ⇒ [<code>LinkedList</code>](#LinkedList)
1951
+
1952
+ <a name="new_LinkedList_new"></a>
1953
+
1954
+ ### new LinkedList()
1955
+ Create the new LinkedList instance.
1956
+
1957
+ <a name="LinkedList+list"></a>
1958
+
1959
+ ### linkedList.list ⇒ [<code>Linker</code>](#Linker)
1960
+ Retrieve a copy of the innerList used.
1961
+
1962
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1963
+ **Overrides**: [<code>list</code>](#Arrayable+list)
1964
+ <a name="LinkedList+first"></a>
1965
+
1966
+ ### linkedList.first ⇒ [<code>Linker</code>](#Linker)
1967
+ Retrieve the first Linker in the list.
1968
+
1969
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1970
+ **Overrides**: [<code>first</code>](#Arrayable+first)
1971
+ <a name="LinkedList+last"></a>
1972
+
1973
+ ### linkedList.last ⇒ [<code>Linker</code>](#Linker)
1974
+ Retrieve the last Linker in the list.
1975
+
1976
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1977
+ **Overrides**: [<code>last</code>](#Arrayable+last)
1978
+ <a name="LinkedList+length"></a>
1979
+
1980
+ ### linkedList.length ⇒ <code>number</code>
1981
+ Return the length of the list.
1982
+
1983
+ **Kind**: instance property of [<code>LinkedList</code>](#LinkedList)
1984
+ **Overrides**: [<code>length</code>](#Arrayable+length)
1985
+ <a name="LinkedList+initialize"></a>
1986
+
1987
+ ### linkedList.initialize(initialList) ⇒ [<code>LinkedList</code>](#LinkedList)
1988
+ Initialize the inner list, should only run once.
1989
+
1990
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
1991
+ **Overrides**: [<code>initialize</code>](#Arrayable+initialize)
1992
+
1993
+ | Param | Type | Description |
1994
+ | --- | --- | --- |
1995
+ | initialList | [<code>Linker</code>](#Linker) \| <code>Array</code> | Give the list of linkers to start in this linked-list. |
1996
+
1997
+ <a name="LinkedList+insertAfter"></a>
1998
+
1999
+ ### linkedList.insertAfter(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
2000
+ Insert a new node (or data) after a node.
2001
+
2002
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2003
+ **Overrides**: [<code>insertAfter</code>](#Arrayable+insertAfter)
2004
+
2005
+ | Param | Type | Description |
2006
+ | --- | --- | --- |
2007
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
2008
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go after the existing node |
2009
+
2010
+ <a name="LinkedList+insertBefore"></a>
2011
+
2012
+ ### linkedList.insertBefore(node, newNode) ⇒ [<code>LinkedList</code>](#LinkedList)
2013
+ Insert a new node (or data) before a node.
2014
+
2015
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2016
+ **Overrides**: [<code>insertBefore</code>](#Arrayable+insertBefore)
2017
+
2018
+ | Param | Type | Description |
2019
+ | --- | --- | --- |
2020
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The existing node as reference |
2021
+ | newNode | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to go before the existing node |
2022
+
2023
+ <a name="LinkedList+append"></a>
2024
+
2025
+ ### linkedList.append(node, after) ⇒ [<code>Linker</code>](#Linker)
2026
+ Add a node (or data) after the given (or last) node in the list.
2027
+
2028
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2029
+ **Overrides**: [<code>append</code>](#Arrayable+append)
2030
+
2031
+ | Param | Type | Description |
2032
+ | --- | --- | --- |
2033
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the end of the list |
2034
+ | after | [<code>Linker</code>](#Linker) | The existing last node |
2035
+
2036
+ <a name="LinkedList+prepend"></a>
2037
+
2038
+ ### linkedList.prepend(node, before) ⇒ [<code>Linker</code>](#Linker)
2039
+ Add a node (or data) before the given (or first) node in the list.
2040
+
2041
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2042
+ **Overrides**: [<code>prepend</code>](#Arrayable+prepend)
2043
+
2044
+ | Param | Type | Description |
2045
+ | --- | --- | --- |
2046
+ | node | [<code>Linker</code>](#Linker) \| <code>\*</code> | The new node to add to the start of the list |
2047
+ | before | [<code>Linker</code>](#Linker) | The existing first node |
2048
+
2049
+ <a name="LinkedList+remove"></a>
2050
+
2051
+ ### linkedList.remove(node) ⇒ [<code>Linker</code>](#Linker)
2052
+ Remove a linker from this linked list.
2053
+
2054
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2055
+ **Overrides**: [<code>remove</code>](#Arrayable+remove)
2056
+
2057
+ | Param | Type | Description |
2058
+ | --- | --- | --- |
2059
+ | node | [<code>Linker</code>](#Linker) | The node we wish to remove (and it will be returned after removal) |
2060
+
2061
+ <a name="LinkedList+item"></a>
2062
+
2063
+ ### linkedList.item(index) ⇒ [<code>Linker</code>](#Linker) \| <code>null</code>
2064
+ Retrieve a Linker item from this list by numeric index, otherwise return null.
2065
+
2066
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2067
+ **Overrides**: [<code>item</code>](#Arrayable+item)
2068
+
2069
+ | Param | Type | Description |
2070
+ | --- | --- | --- |
2071
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
2072
+
2073
+ <a name="LinkedList+forEach"></a>
2074
+
2075
+ ### linkedList.forEach(callback, thisArg) ⇒ [<code>LinkedList</code>](#LinkedList)
2076
+ Be able to run forEach on this LinkedList to iterate over the linkers.
2077
+
2078
+ **Kind**: instance method of [<code>LinkedList</code>](#LinkedList)
2079
+ **Overrides**: [<code>forEach</code>](#Arrayable+forEach)
2080
+
2081
+ | Param | Type | Description |
2082
+ | --- | --- | --- |
2083
+ | callback | <code>forEachCallback</code> | The function to call for-each linker |
2084
+ | thisArg | [<code>LinkedList</code>](#LinkedList) | Optional, 'this' reference |
2085
+
2086
+ <a name="DoublyLinkedList"></a>
2087
+
2088
+ ## DoublyLinkedList ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2089
+ Convert an array into a DoublyLinkedList instance, return the new instance.
2090
+
2091
+ **Kind**: global variable
2092
+
2093
+ | Param | Type | Default | Description |
2094
+ | --- | --- | --- | --- |
2095
+ | [values] | <code>Array</code> | <code>[]</code> | An array of values which will be converted to linkers in this doubly-linked-list |
2096
+ | [linkerClass] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | The class to use for each linker |
2097
+ | [classType] | <code>IsArrayable.&lt;IsDoubleLinker&gt;</code> | <code>LinkedList</code> | Provide the type of IsArrayable to use. |
2098
+
2099
+
2100
+ * [DoublyLinkedList](#DoublyLinkedList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2101
+ * [new DoublyLinkedList()](#new_DoublyLinkedList_new)
2102
+ * [.list](#DoublyLinkedList+list) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2103
+ * [.first](#DoublyLinkedList+first) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2104
+ * [.last](#DoublyLinkedList+last) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2105
+ * [.length](#DoublyLinkedList+length) ⇒ <code>number</code>
2106
+ * [.initialize(initialList)](#DoublyLinkedList+initialize) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2107
+ * [.insertAfter(node, newNode)](#DoublyLinkedList+insertAfter) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2108
+ * [.insertBefore(node, newNode)](#DoublyLinkedList+insertBefore) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2109
+ * [.append(node, after)](#DoublyLinkedList+append) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2110
+ * [.prepend(node, before)](#DoublyLinkedList+prepend) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2111
+ * [.remove(node)](#DoublyLinkedList+remove) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2112
+ * [.reset()](#DoublyLinkedList+reset) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2113
+ * [.item(index)](#DoublyLinkedList+item) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
2114
+ * [.forEach(callback, thisArg)](#DoublyLinkedList+forEach)
2115
+
2116
+ <a name="new_DoublyLinkedList_new"></a>
2117
+
2118
+ ### new DoublyLinkedList()
2119
+ Create the new DoublyLinkedList instance.
2120
+
2121
+ <a name="DoublyLinkedList+list"></a>
2122
+
2123
+ ### doublyLinkedList.list ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2124
+ Retrieve a copy of the innerList used.
2125
+
2126
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2127
+ **Overrides**: [<code>list</code>](#LinkedList+list)
2128
+ <a name="DoublyLinkedList+first"></a>
2129
+
2130
+ ### doublyLinkedList.first ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2131
+ Retrieve the first DoubleLinker in the list.
2132
+
2133
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2134
+ **Overrides**: [<code>first</code>](#LinkedList+first)
2135
+ <a name="DoublyLinkedList+last"></a>
2136
+
2137
+ ### doublyLinkedList.last ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2138
+ Retrieve the last DoubleLinker in the list.
2139
+
2140
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2141
+ **Overrides**: [<code>last</code>](#LinkedList+last)
2142
+ <a name="DoublyLinkedList+length"></a>
2143
+
2144
+ ### doublyLinkedList.length ⇒ <code>number</code>
2145
+ Return the length of the list.
2146
+
2147
+ **Kind**: instance property of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2148
+ **Overrides**: [<code>length</code>](#LinkedList+length)
2149
+ <a name="DoublyLinkedList+initialize"></a>
2150
+
2151
+ ### doublyLinkedList.initialize(initialList) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2152
+ Initialize the inner list, should only run once.
2153
+
2154
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2155
+ **Overrides**: [<code>initialize</code>](#LinkedList+initialize)
2156
+
2157
+ | Param | Type | Description |
2158
+ | --- | --- | --- |
2159
+ | initialList | [<code>DoubleLinker</code>](#DoubleLinker) | Give the list of double-linkers to start in this doubly linked-list. |
2160
+
2161
+ <a name="DoublyLinkedList+insertAfter"></a>
2162
+
2163
+ ### doublyLinkedList.insertAfter(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2164
+ Insert a new node (or data) after a node.
2165
+
2166
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2167
+ **Overrides**: [<code>insertAfter</code>](#LinkedList+insertAfter)
2168
+
2169
+ | Param | Type | Description |
2170
+ | --- | --- | --- |
2171
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
2172
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go after the existing node |
2173
+
2174
+ <a name="DoublyLinkedList+insertBefore"></a>
2175
+
2176
+ ### doublyLinkedList.insertBefore(node, newNode) ⇒ [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2177
+ Insert a new node (or data) before a node.
2178
+
2179
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2180
+ **Overrides**: [<code>insertBefore</code>](#LinkedList+insertBefore)
2181
+
2182
+ | Param | Type | Description |
2183
+ | --- | --- | --- |
2184
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The existing node as reference |
2185
+ | newNode | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to go before the existing node |
2186
+
2187
+ <a name="DoublyLinkedList+append"></a>
2188
+
2189
+ ### doublyLinkedList.append(node, after) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2190
+ Add a node (or data) after the given (or last) node in the list.
2191
+
2192
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2193
+ **Overrides**: [<code>append</code>](#LinkedList+append)
2194
+
2195
+ | Param | Type | Description |
2196
+ | --- | --- | --- |
2197
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the end of the list |
2198
+ | after | [<code>DoubleLinker</code>](#DoubleLinker) | The existing last node |
2199
+
2200
+ <a name="DoublyLinkedList+prepend"></a>
2201
+
2202
+ ### doublyLinkedList.prepend(node, before) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2203
+ Add a node (or data) before the given (or first) node in the list.
2204
+
2205
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2206
+ **Overrides**: [<code>prepend</code>](#LinkedList+prepend)
2207
+
2208
+ | Param | Type | Description |
2209
+ | --- | --- | --- |
2210
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | The new node to add to the start of the list |
2211
+ | before | [<code>DoubleLinker</code>](#DoubleLinker) | The existing first node |
2212
+
2213
+ <a name="DoublyLinkedList+remove"></a>
2214
+
2215
+ ### doublyLinkedList.remove(node) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2216
+ Remove a linker from this linked list.
2217
+
2218
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2219
+ **Overrides**: [<code>remove</code>](#LinkedList+remove)
2220
+
2221
+ | Param | Type | Description |
2222
+ | --- | --- | --- |
2223
+ | node | [<code>DoubleLinker</code>](#DoubleLinker) | The node we wish to remove (and it will be returned after removal) |
2224
+
2225
+ <a name="DoublyLinkedList+reset"></a>
2226
+
2227
+ ### doublyLinkedList.reset() ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2228
+ Refresh all references and return head reference.
2229
+
2230
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2231
+ <a name="DoublyLinkedList+item"></a>
2232
+
2233
+ ### doublyLinkedList.item(index) ⇒ [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code>
2234
+ Retrieve a DoubleLinker item from this list by numeric index, otherwise return null.
2235
+
2236
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2237
+ **Overrides**: [<code>item</code>](#LinkedList+item)
2238
+
2239
+ | Param | Type | Description |
2240
+ | --- | --- | --- |
2241
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
2242
+
2243
+ <a name="DoublyLinkedList+forEach"></a>
2244
+
2245
+ ### doublyLinkedList.forEach(callback, thisArg)
2246
+ Be able to run forEach on this DoublyLinkedList to iterate over the DoubleLinker Items.
2247
+
2248
+ **Kind**: instance method of [<code>DoublyLinkedList</code>](#DoublyLinkedList)
2249
+ **Overrides**: [<code>forEach</code>](#LinkedList+forEach)
2250
+
2251
+ | Param | Type | Description |
2252
+ | --- | --- | --- |
2253
+ | callback | <code>forEachCallback</code> | The function to call for-each double linker |
2254
+ | thisArg | [<code>DoublyLinkedList</code>](#DoublyLinkedList) | Optional, 'this' reference |
2255
+
2256
+ <a name="DoubleLinker"></a>
2257
+
2258
+ ## DoubleLinker ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2259
+ Make a new DoubleLinker from the data given if it is not already a valid Linker.
2260
+
2261
+ **Kind**: global variable
2262
+
2263
+ | Param | Type | Default | Description |
2264
+ | --- | --- | --- | --- |
2265
+ | linker | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>\*</code> | | Return a valid Linker instance from given data, or even an already valid one. |
2266
+ | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
2267
+
2268
+
2269
+ * [DoubleLinker](#DoubleLinker) ⇒ [<code>DoubleLinker</code>](#DoubleLinker)
2270
+ * [new DoubleLinker([nodeData])](#new_DoubleLinker_new)
2271
+ * [.fromArray([values], [classType])](#DoubleLinker.fromArray) ⇒ <code>Object</code>
2272
+
2273
+ <a name="new_DoubleLinker_new"></a>
2274
+
2275
+ ### new DoubleLinker([nodeData])
2276
+ Create the new DoubleLinker instance, provide the data and optionally the next and prev references.
2277
+
2278
+
2279
+ | Param | Type | Default | Description |
2280
+ | --- | --- | --- | --- |
2281
+ | [nodeData] | <code>Object</code> | <code>{}</code> | |
2282
+ | [nodeData.data] | <code>\*</code> | <code></code> | The data to be stored in this linker |
2283
+ | [nodeData.next] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the next linker if any |
2284
+ | [nodeData.prev] | [<code>DoubleLinker</code>](#DoubleLinker) \| <code>null</code> | <code></code> | The reference to the previous linker if any |
2285
+
2286
+ <a name="DoubleLinker.fromArray"></a>
2287
+
2288
+ ### DoubleLinker.fromArray([values], [classType]) ⇒ <code>Object</code>
2289
+ Convert an array into DoubleLinker instances, return the head and tail DoubleLinkers.
2290
+
2291
+ **Kind**: static method of [<code>DoubleLinker</code>](#DoubleLinker)
2292
+
2293
+ | Param | Type | Default | Description |
2294
+ | --- | --- | --- | --- |
2295
+ | [values] | <code>Array</code> | <code>[]</code> | Provide an array of data that will be converted to a chain of linkers. |
2296
+ | [classType] | <code>IsDoubleLinker</code> | <code>DoubleLinker</code> | Provide the type of IsDoubleLinker to use. |
2297
+
2298
+ <a name="Arrayable"></a>
2299
+
2300
+ ## Arrayable ⇒ [<code>Arrayable</code>](#Arrayable)
2301
+ Convert an array to an Arrayable.
2302
+
2303
+ **Kind**: global variable
2304
+
2305
+ | Param | Type | Default | Description |
2306
+ | --- | --- | --- | --- |
2307
+ | values | <code>Array</code> | | An array of values which will be converted to elements in this arrayable |
2308
+ | [elementClass] | <code>IsElement</code> | <code>ArrayElement</code> | The class to use for each element |
2309
+ | [classType] | [<code>IsArrayable.&lt;ArrayElement&gt;</code>](#ArrayElement) | <code>Arrayable</code> | Provide the type of IsArrayable to use. |
2310
+
2311
+
2312
+ * [Arrayable](#Arrayable) ⇒ [<code>Arrayable</code>](#Arrayable)
2313
+ * [new Arrayable()](#new_Arrayable_new)
2314
+ * [.list](#Arrayable+list) ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
2315
+ * [.first](#Arrayable+first) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2316
+ * [.last](#Arrayable+last) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2317
+ * [.length](#Arrayable+length) ⇒ <code>number</code>
2318
+ * [.initialize(initialList)](#Arrayable+initialize) ⇒ [<code>Arrayable</code>](#Arrayable)
2319
+ * [.insertAfter(node, newNode)](#Arrayable+insertAfter) ⇒ [<code>Arrayable</code>](#Arrayable)
2320
+ * [.insertBefore(node, newNode)](#Arrayable+insertBefore) ⇒ [<code>Arrayable</code>](#Arrayable)
2321
+ * [.append(node, after)](#Arrayable+append) ⇒ [<code>Arrayable</code>](#Arrayable)
2322
+ * [.prepend(node, before)](#Arrayable+prepend) ⇒ [<code>Arrayable</code>](#Arrayable)
2323
+ * [.remove(node)](#Arrayable+remove) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2324
+ * [.item(index)](#Arrayable+item) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
2325
+ * [.forEach(callback, thisArg)](#Arrayable+forEach) ⇒ [<code>Arrayable</code>](#Arrayable)
2326
+
2327
+ <a name="new_Arrayable_new"></a>
2328
+
2329
+ ### new Arrayable()
2330
+ Create the new Arrayable instance, configure the Arrayable class.
2331
+
2332
+ <a name="Arrayable+list"></a>
2333
+
2334
+ ### arrayable.list ⇒ [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement)
2335
+ Retrieve a copy of the innerList used.
2336
+
2337
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2338
+ <a name="Arrayable+first"></a>
2339
+
2340
+ ### arrayable.first ⇒ [<code>ArrayElement</code>](#ArrayElement)
2341
+ Retrieve the first Element from the Arrayable
2342
+
2343
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2344
+ <a name="Arrayable+last"></a>
2345
+
2346
+ ### arrayable.last ⇒ [<code>ArrayElement</code>](#ArrayElement)
2347
+ Retrieve the last Element from the Arrayable
2348
+
2349
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2350
+ <a name="Arrayable+length"></a>
2351
+
2352
+ ### arrayable.length ⇒ <code>number</code>
2353
+ Return the length of the list.
2354
+
2355
+ **Kind**: instance property of [<code>Arrayable</code>](#Arrayable)
2356
+ <a name="Arrayable+initialize"></a>
2357
+
2358
+ ### arrayable.initialize(initialList) ⇒ [<code>Arrayable</code>](#Arrayable)
2359
+ Initialize the inner list, should only run once.
2360
+
2361
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2362
+
2363
+ | Param | Type | Description |
2364
+ | --- | --- | --- |
2365
+ | initialList | [<code>Array.&lt;ArrayElement&gt;</code>](#ArrayElement) | Give the array of elements to start in this Arrayable. |
2366
+
2367
+ <a name="Arrayable+insertAfter"></a>
2368
+
2369
+ ### arrayable.insertAfter(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
2370
+ Insert a new node (or data) after a node.
2371
+
2372
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2373
+
2374
+ | Param | Type | Description |
2375
+ | --- | --- | --- |
2376
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
2377
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go after the existing node |
2378
+
2379
+ <a name="Arrayable+insertBefore"></a>
2380
+
2381
+ ### arrayable.insertBefore(node, newNode) ⇒ [<code>Arrayable</code>](#Arrayable)
2382
+ Insert a new node (or data) before a node.
2383
+
2384
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2385
+
2386
+ | Param | Type | Description |
2387
+ | --- | --- | --- |
2388
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The existing node as reference |
2389
+ | newNode | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to go before the existing node |
2390
+
2391
+ <a name="Arrayable+append"></a>
2392
+
2393
+ ### arrayable.append(node, after) ⇒ [<code>Arrayable</code>](#Arrayable)
2394
+ Add a node (or data) after the given (or last) node in the list.
2395
+
2396
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2397
+
2398
+ | Param | Type | Description |
2399
+ | --- | --- | --- |
2400
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the end of the list |
2401
+ | after | [<code>ArrayElement</code>](#ArrayElement) | The existing last node |
2402
+
2403
+ <a name="Arrayable+prepend"></a>
2404
+
2405
+ ### arrayable.prepend(node, before) ⇒ [<code>Arrayable</code>](#Arrayable)
2406
+ Add a node (or data) before the given (or first) node in the list.
2407
+
2408
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2409
+
2410
+ | Param | Type | Description |
2411
+ | --- | --- | --- |
2412
+ | node | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | The new node to add to the start of the list |
2413
+ | before | [<code>ArrayElement</code>](#ArrayElement) | The existing first node |
2414
+
2415
+ <a name="Arrayable+remove"></a>
2416
+
2417
+ ### arrayable.remove(node) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2418
+ Remove an element from this arrayable.
2419
+
2420
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2421
+
2422
+ | Param | Type | Description |
2423
+ | --- | --- | --- |
2424
+ | node | [<code>ArrayElement</code>](#ArrayElement) | The node we wish to remove (and it will be returned after removal) |
2425
+
2426
+ <a name="Arrayable+item"></a>
2427
+
2428
+ ### arrayable.item(index) ⇒ [<code>ArrayElement</code>](#ArrayElement) \| <code>null</code>
2429
+ Retrieve an ArrayElement item from this list by numeric index, otherwise return null.
2430
+
2431
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2432
+
2433
+ | Param | Type | Description |
2434
+ | --- | --- | --- |
2435
+ | index | <code>number</code> | The integer number for retrieving a node by position. |
2436
+
2437
+ <a name="Arrayable+forEach"></a>
2438
+
2439
+ ### arrayable.forEach(callback, thisArg) ⇒ [<code>Arrayable</code>](#Arrayable)
2440
+ Be able to run forEach on this Arrayable to iterate over the elements.
2441
+
2442
+ **Kind**: instance method of [<code>Arrayable</code>](#Arrayable)
2443
+
2444
+ | Param | Type | Description |
2445
+ | --- | --- | --- |
2446
+ | callback | <code>forEachCallback</code> | The function to call for-each element |
2447
+ | thisArg | [<code>Arrayable</code>](#Arrayable) | Optional, 'this' reference |
2448
+
2449
+ <a name="ArrayElement"></a>
2450
+
2451
+ ## ArrayElement ⇒ [<code>ArrayElement</code>](#ArrayElement)
2452
+ Make a new Element from the data given if it is not already a valid Element.
2453
+
2454
+ **Kind**: global variable
2455
+
2456
+ | Param | Type | Default | Description |
2457
+ | --- | --- | --- | --- |
2458
+ | element | [<code>ArrayElement</code>](#ArrayElement) \| <code>\*</code> | | Return a valid ArrayElement instance from given data, or even an already valid one. |
2459
+ | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
2460
+
2461
+
2462
+ * [ArrayElement](#ArrayElement) ⇒ [<code>ArrayElement</code>](#ArrayElement)
2463
+ * [new ArrayElement([data])](#new_ArrayElement_new)
2464
+ * [.fromArray([values], [classType])](#ArrayElement.fromArray) ⇒ <code>Object</code>
2465
+
2466
+ <a name="new_ArrayElement_new"></a>
2467
+
2468
+ ### new ArrayElement([data])
2469
+ Create the new Element instance, provide the data and optionally configure the type of Element.
2470
+
2471
+
2472
+ | Param | Type | Default | Description |
2473
+ | --- | --- | --- | --- |
2474
+ | [data] | <code>\*</code> | <code></code> | The data to be stored in this element. |
2475
+
2476
+ <a name="ArrayElement.fromArray"></a>
2477
+
2478
+ ### ArrayElement.fromArray([values], [classType]) ⇒ <code>Object</code>
2479
+ Convert an array into Element instances, return the head and tail Elements.
2480
+
2481
+ **Kind**: static method of [<code>ArrayElement</code>](#ArrayElement)
2482
+
2483
+ | Param | Type | Default | Description |
2484
+ | --- | --- | --- | --- |
2485
+ | [values] | <code>Array.&lt;IsElement&gt;</code> | <code>[]</code> | Provide an array of data that will be converted to array of elements. |
2486
+ | [classType] | <code>IsElement</code> | <code>ArrayElement</code> | Provide the type of IsElement to use. |
2487
+
2488
+ <a name="services"></a>
2489
+
2490
+ ## services
2491
+ List helpful functions when dealing with collections.
2492
+
2493
+ **Kind**: global constant
2494
+ <a name="recipes"></a>
2495
+
2496
+ ## recipes
2497
+ List of class declarations that can be used to specify attributes for a style of object / class.
2498
+
2499
+ **Kind**: global constant
2500
+ <a name="parseTreeNext"></a>
2501
+
2502
+ ## parseTreeNext(treeNode) ⇒ <code>IsTreeNode</code> \| <code>null</code>
2503
+ Be able to parse over every node in a tree.
2504
+ 1. Start at root (get root parent)
2505
+ 2. Get first child (repeat until no children)
2506
+ 3. Check next child
2507
+ 4. Repeat 2
2508
+ 5. Repeat 3
2509
+ 6. If no next child, return to parent and repeat 3
2510
+ 7. Stop at root (next is null and parent is null
2511
+
2512
+ **Kind**: global function
2513
+
2514
+ | Param | Type | Description |
2515
+ | --- | --- | --- |
2516
+ | treeNode | <code>IsTreeNode</code> | Provide a node in a tree and get the next node (left-first approach) |
2517
+
2518
+ <a name="parseTree"></a>
2519
+
2520
+ ## parseTree(tree, callback) ⇒ <code>IsArrayable.&lt;IsTreeNode&gt;</code>
2521
+ Loop over all the nodes in a tree starting from left and apply a callback for each
2522
+
2523
+ **Kind**: global function
2524
+
2525
+ | Param | Type |
2526
+ | --- | --- |
2527
+ | tree | <code>IsArrayable.&lt;IsTreeNode&gt;</code> |
2528
+ | callback | <code>forEachCallback</code> |
2529
+