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