-
Notifications
You must be signed in to change notification settings - Fork 668
/
Node.java
733 lines (623 loc) · 27.1 KB
/
Node.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
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
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
367
368
369
370
371
372
373
374
375
376
377
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
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
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
537
538
539
540
541
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
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
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
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
723
724
725
726
727
728
729
730
731
732
733
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.util.stream;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.DoubleConsumer;
import java.util.function.IntConsumer;
import java.util.function.IntFunction;
import java.util.function.LongConsumer;
/**
* An immutable container for describing an ordered sequence of elements of some type {@code T}.
*
* <p>A {@code Node} contains a fixed number of elements, which can be accessed
* via the {@link #count}, {@link #spliterator}, {@link #forEach},
* {@link #asArray}, or {@link #copyInto} methods. A {@code Node} may have zero
* or more child {@code Node}s; if it has no children (accessed via
* {@link #getChildCount} and {@link #getChild(int)}, it is considered <em>flat
* </em> or a <em>leaf</em>; if it has children, it is considered an
* <em>internal</em> node. The size of an internal node is the sum of sizes of
* its children.
*
* @param <T> the type of elements.
*
* @apiNote <p>A {@code Node} typically does not store the elements directly, but instead
* mediates access to one or more existing (effectively immutable) data
* structures such as a {@code Collection}, array, or a set of other
* {@code Node}s. Commonly {@code Node}s are formed into a tree whose shape
* corresponds to the computation tree that produced the elements that are
* contained in the leaf nodes. The use of {@code Node} within the stream
* framework is largely to avoid copying data unnecessarily during parallel
* operations.
* @since 1.8
*/
/*
* Node容器接口(引用类型版本)
*
* Node用来收集流式操作中择取出的元素。
*/
interface Node<T> {
/**
* Returns a {@link Spliterator} describing the elements contained in this
* {@code Node}.
*
* @return a {@code Spliterator} describing the elements contained in this
* {@code Node}
*/
// 返回当前Node的流迭代器
Spliterator<T> spliterator();
/**
* Traverses the elements of this node, and invoke the provided
* {@code Consumer} with each element. Elements are provided in encounter
* order if the source for the {@code Node} has a defined encounter order.
*
* @param consumer a {@code Consumer} that is to be invoked with each
* element in this {@code Node}
*/
// 尝试用consumer逐个消费当前Node中所有剩余元素
void forEach(Consumer<? super T> consumer);
/**
* Provides an array view of the contents of this node.
*
* <p>Depending on the underlying implementation, this may return a
* reference to an internal array rather than a copy. Since the returned
* array may be shared, the returned array should not be modified. The
* {@code generator} function may be consulted to create the array if a new
* array needs to be created.
*
* @param generator a factory function which takes an integer parameter and
* returns a new, empty array of that size and of the appropriate
* array type
*
* @return an array containing the contents of this {@code Node}
*/
// 将Node中的元素复制到使用generator构造的数组中后返回
T[] asArray(IntFunction<T[]> generator);
/**
* Copies the content of this {@code Node} into an array, starting at a
* given offset into the array. It is the caller's responsibility to ensure
* there is sufficient room in the array, otherwise unspecified behaviour
* will occur if the array length is less than the number of elements
* contained in this node.
*
* @param array the array into which to copy the contents of this
* {@code Node}
* @param offset the starting offset within the array
*
* @throws IndexOutOfBoundsException if copying would cause access of data
* outside array bounds
* @throws NullPointerException if {@code array} is {@code null}
*/
// 将Node中的元素复制到数组array的offset索引处
void copyInto(T[] array, int offset);
/**
* Returns the number of elements contained in this node.
*
* @return the number of elements contained in this node
*/
// 返回Node中包含的元素数量
long count();
/**
* Returns the number of child nodes of this node.
*
* @return the number of child nodes
*
* @implSpec The default implementation returns zero.
*/
// 返回子Node数量(通常用于树状Node)
default int getChildCount() {
return 0;
}
/**
* Retrieves the child {@code Node} at a given index.
*
* @param i the index to the child node
*
* @return the child node
*
* @throws IndexOutOfBoundsException if the index is less than 0 or greater
* than or equal to the number of child nodes
* @implSpec The default implementation always throws
* {@code IndexOutOfBoundsException}.
*/
// 返回指定索引处的子Node(通常用于树状Node)
default Node<T> getChild(int index) {
throw new IndexOutOfBoundsException();
}
/**
* Return a node describing a subsequence of the elements of this node,
* starting at the given inclusive start offset and ending at the given exclusive end offset.
*
* @param from The (inclusive) starting offset of elements to include, must
* be in range 0..count().
* @param to The (exclusive) end offset of elements to include, must be
* in range 0..count().
* @param generator A function to be used to create a new array, if needed,
* for reference nodes.
*
* @return the truncated node
*/
/*
* 将Node中[from, to)范围内的元素打包到新建的子Node中返回
* 注:打包过程可能伴随着进一步的择取
*/
default Node<T> truncate(long from, long to, IntFunction<T[]> generator) {
if(from == 0 && to == count()) {
return this;
}
// 获取当前Node的流迭代器
Spliterator<T> spliterator = spliterator();
long size = to - from;
// 构造增强"数组"Node或"弹性缓冲区"Node(引用类型版本)
Node.Builder<T> nodeBuilderSink = Nodes.builder(size, generator);
// 激活sink链上所有sink,完成一些初始化工作,准备接收数据
nodeBuilderSink.begin(size);
// 跳过from之前的元素
for(int i = 0; i<from && spliterator.tryAdvance(e -> {}); i++) {
}
// 如果需要对所有剩余元素进行择取
if(to == count()) {
// 尝试用nodeBuilderSink逐个消费当前流迭代器中所有剩余元素
spliterator.forEachRemaining(nodeBuilderSink);
// 只对剩余的部分元素进行择取
} else {
for(int i = 0; i<size && spliterator.tryAdvance(nodeBuilderSink); i++) {
}
}
// 关闭sink链,结束本轮计算
nodeBuilderSink.end();
// 返回构造的Node
return nodeBuilderSink.build();
}
/**
* Gets the {@code StreamShape} associated with this {@code Node}.
*
* @return the stream shape associated with this node
*
* @implSpec The default in {@code Node} returns
* {@code StreamShape.REFERENCE}
*/
// 返回流的形状
default StreamShape getShape() {
return StreamShape.REFERENCE;
}
// Node容器接口(基本数值类型版本)
interface OfPrimitive<T, T_CONS, T_ARR, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>, T_NODE extends OfPrimitive<T, T_CONS, T_ARR, T_SPLITR, T_NODE>> extends Node<T> {
/**
* {@inheritDoc}
*
* @return a {@link Spliterator.OfPrimitive} describing the elements of
* this node
*/
// 返回当前Node的流迭代器
@Override
T_SPLITR spliterator();
/**
* Traverses the elements of this node, and invoke the provided
* {@code action} with each element.
*
* @param action a consumer that is to be invoked with each
* element in this {@code Node.OfPrimitive}
*/
// 尝试用action逐个消费当前Node中所有剩余元素
@SuppressWarnings("overloads")
void forEach(T_CONS action);
/**
* {@inheritDoc}
*
* @implSpec the default implementation invokes the generator to create
* an instance of a boxed primitive array with a length of
* {@link #count()} and then invokes {@link #copyInto(T[], int)} with
* that array at an offset of 0.
*/
// 将Node中的元素复制到使用generator构造的数组中后返回
@Override
default T[] asArray(IntFunction<T[]> generator) {
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfPrimitive.asArray");
}
long size = count();
if(size >= Nodes.MAX_ARRAY_SIZE) {
throw new IllegalArgumentException(Nodes.BAD_SIZE);
}
T[] boxed = generator.apply((int) count());
copyInto(boxed, 0);
return boxed;
}
/**
* Copies the content of this {@code Node} into a primitive array,
* starting at a given offset into the array. It is the caller's
* responsibility to ensure there is sufficient room in the array.
*
* @param array the array into which to copy the contents of this
* {@code Node}
* @param offset the starting offset within the array
*
* @throws IndexOutOfBoundsException if copying would cause access of
* data outside array bounds
* @throws NullPointerException if {@code array} is {@code null}
*/
// 将Node中的元素复制到数组array的offset索引处
void copyInto(T_ARR array, int offset);
// 返回指定索引处的子Node(通常用于树状Node)
@Override
default T_NODE getChild(int index) {
throw new IndexOutOfBoundsException();
}
/*
* 将Node中[from, to)范围内的元素打包到新建的子Node中返回
* 注:打包过程可能伴随着进一步的择取
*/
T_NODE truncate(long from, long to, IntFunction<T[]> generator);
/**
* Views this node as a primitive array.
*
* <p>Depending on the underlying implementation this may return a
* reference to an internal array rather than a copy. It is the callers
* responsibility to decide if either this node or the array is utilized
* as the primary reference for the data.</p>
*
* @return an array containing the contents of this {@code Node}
*/
// 将Node中的元素存入基本类型数组后返回
T_ARR asPrimitiveArray();
/**
* Creates a new primitive array.
*
* @param count the length of the primitive array.
*
* @return the new primitive array.
*/
// 创建size容量的基本数值类型数组
T_ARR newArray(int size);
}
/**
* Specialized {@code Node} for int elements
*/
// Node容器接口(int类型版本)
interface OfInt extends OfPrimitive<Integer, IntConsumer, int[], Spliterator.OfInt, OfInt> {
/**
* {@inheritDoc}
*
* @param consumer a {@code Consumer} that is to be invoked with each
* element in this {@code Node}. If this is an
* {@code IntConsumer}, it is cast to {@code IntConsumer} so the
* elements may be processed without boxing.
*/
// 尝试用consumer逐个消费当前Node中所有剩余元素
@Override
default void forEach(Consumer<? super Integer> consumer) {
if(consumer instanceof IntConsumer) {
forEach((IntConsumer) consumer);
return;
}
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfInt.forEachRemaining(Consumer)");
}
spliterator().forEachRemaining(consumer);
}
/**
* {@inheritDoc}
*
* @implSpec the default implementation invokes {@link #asPrimitiveArray()} to
* obtain an int[] array then and copies the elements from that int[]
* array into the boxed Integer[] array. This is not efficient and it
* is recommended to invoke {@link #copyInto(Object, int)}.
*/
// 将Node中的元素复制到数组boxed的offset索引处
@Override
default void copyInto(Integer[] boxed, int offset) {
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfInt.copyInto(Integer[], int)");
}
int[] array = asPrimitiveArray();
for(int i = 0; i<array.length; i++) {
boxed[offset + i] = array[i];
}
}
/*
* 将Node中[from, to)范围内的元素打包到新建的子Node中返回
* 注:打包过程可能伴随着进一步的择取
*/
@Override
default Node.OfInt truncate(long from, long to, IntFunction<Integer[]> generator) {
if(from == 0 && to == count()) {
return this;
}
long size = to - from;
// 获取当前Node的流迭代器
Spliterator.OfInt spliterator = spliterator();
// 构造增强"数组"Node或"弹性缓冲区"Node(引用类型版本)
Node.Builder.OfInt nodeBuilderSink = Nodes.intBuilder(size);
// 激活sink链上所有sink,完成一些初始化工作,准备接收数据
nodeBuilderSink.begin(size);
// 跳过from之前的元素
for(int i = 0; i<from && spliterator.tryAdvance((IntConsumer) e -> { }); i++) {
}
// 如果需要对所有剩余元素进行择取
if(to == count()) {
// 尝试用nodeBuilderSink逐个消费当前流迭代器中所有剩余元素
spliterator.forEachRemaining((IntConsumer) nodeBuilderSink);
// 只对剩余的部分元素进行择取
} else {
for(int i = 0; i<size && spliterator.tryAdvance((IntConsumer) nodeBuilderSink); i++) {
}
}
// 关闭sink链,结束本轮计算
nodeBuilderSink.end();
// 返回构造的Node
return nodeBuilderSink.build();
}
/**
* {@inheritDoc}
*
* @implSpec The default in {@code Node.OfInt} returns
* {@code StreamShape.INT_VALUE}
*/
// 返回流的形状
default StreamShape getShape() {
return StreamShape.INT_VALUE;
}
// 创建size容量的int类型数组
@Override
default int[] newArray(int size) {
return new int[size];
}
}
/**
* Specialized {@code Node} for long elements
*/
// Node容器接口(long类型版本)
interface OfLong extends OfPrimitive<Long, LongConsumer, long[], Spliterator.OfLong, OfLong> {
/**
* {@inheritDoc}
*
* @param consumer A {@code Consumer} that is to be invoked with each
* element in this {@code Node}. If this is an
* {@code LongConsumer}, it is cast to {@code LongConsumer} so
* the elements may be processed without boxing.
*/
// 尝试用consumer逐个消费当前Node中所有剩余元素
@Override
default void forEach(Consumer<? super Long> consumer) {
if(consumer instanceof LongConsumer) {
forEach((LongConsumer) consumer);
return;
}
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfLong.forEachRemaining(Consumer)");
}
spliterator().forEachRemaining(consumer);
}
/**
* {@inheritDoc}
*
* @implSpec the default implementation invokes {@link #asPrimitiveArray()}
* to obtain a long[] array then and copies the elements from that
* long[] array into the boxed Long[] array. This is not efficient and
* it is recommended to invoke {@link #copyInto(Object, int)}.
*/
// 将Node中的元素复制到数组boxed的offset索引处
@Override
default void copyInto(Long[] boxed, int offset) {
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfInt.copyInto(Long[], int)");
}
long[] array = asPrimitiveArray();
for(int i = 0; i<array.length; i++) {
boxed[offset + i] = array[i];
}
}
/*
* 将Node中[from, to)范围内的元素打包到新建的子Node中返回
* 注:打包过程可能伴随着进一步的择取
*/
@Override
default Node.OfLong truncate(long from, long to, IntFunction<Long[]> generator) {
if(from == 0 && to == count()) {
return this;
}
long size = to - from;
// 获取当前Node的流迭代器
Spliterator.OfLong spliterator = spliterator();
// 构造增强"数组"Node或"弹性缓冲区"Node(引用类型版本)
Node.Builder.OfLong nodeBuilderSink = Nodes.longBuilder(size);
// 激活sink链上所有sink,完成一些初始化工作,准备接收数据
nodeBuilderSink.begin(size);
// 跳过from之前的元素
for(int i = 0; i<from && spliterator.tryAdvance((LongConsumer) e -> { }); i++) {
}
// 如果需要对所有剩余元素进行择取
if(to == count()) {
spliterator.forEachRemaining((LongConsumer) nodeBuilderSink);
// 只对剩余的部分元素进行择取
} else {
for(int i = 0; i<size && spliterator.tryAdvance((LongConsumer) nodeBuilderSink); i++) {
}
}
// 关闭sink链,结束本轮计算
nodeBuilderSink.end();
// 返回构造的Node
return nodeBuilderSink.build();
}
/**
* {@inheritDoc}
*
* @implSpec The default in {@code Node.OfLong} returns
* {@code StreamShape.LONG_VALUE}
*/
// 返回流的形状
default StreamShape getShape() {
return StreamShape.LONG_VALUE;
}
// 创建size容量的long类型数组
@Override
default long[] newArray(int size) {
return new long[size];
}
}
/**
* Specialized {@code Node} for double elements
*/
// Node容器接口(double类型版本)
interface OfDouble extends OfPrimitive<Double, DoubleConsumer, double[], Spliterator.OfDouble, OfDouble> {
/**
* {@inheritDoc}
*
* @param consumer A {@code Consumer} that is to be invoked with each
* element in this {@code Node}. If this is an
* {@code DoubleConsumer}, it is cast to {@code DoubleConsumer}
* so the elements may be processed without boxing.
*/
// 尝试用consumer逐个消费当前Node中所有剩余元素
@Override
default void forEach(Consumer<? super Double> consumer) {
if(consumer instanceof DoubleConsumer) {
forEach((DoubleConsumer) consumer);
return;
}
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfLong.forEachRemaining(Consumer)");
}
spliterator().forEachRemaining(consumer);
}
/**
* {@inheritDoc}
*
* @implSpec the default implementation invokes {@link #asPrimitiveArray()}
* to obtain a double[] array then and copies the elements from that
* double[] array into the boxed Double[] array. This is not efficient
* and it is recommended to invoke {@link #copyInto(Object, int)}.
*/
// 将Node中的元素复制到数组boxed的offset索引处
@Override
default void copyInto(Double[] boxed, int offset) {
if(Tripwire.ENABLED) {
Tripwire.trip(getClass(), "{0} calling Node.OfDouble.copyInto(Double[], int)");
}
double[] array = asPrimitiveArray();
for(int i = 0; i<array.length; i++) {
boxed[offset + i] = array[i];
}
}
/*
* 将Node中[from, to)范围内的元素打包到新建的子Node中返回
* 注:打包过程可能伴随着进一步的择取
*/
@Override
default Node.OfDouble truncate(long from, long to, IntFunction<Double[]> generator) {
if(from == 0 && to == count()) {
return this;
}
long size = to - from;
// 获取当前Node的流迭代器
Spliterator.OfDouble spliterator = spliterator();
// 构造增强"数组"Node或"弹性缓冲区"Node(引用类型版本)
Node.Builder.OfDouble nodeBuilderSink = Nodes.doubleBuilder(size);
// 激活sink链上所有sink,完成一些初始化工作,准备接收数据
nodeBuilderSink.begin(size);
// 跳过from之前的元素
for(int i = 0; i<from && spliterator.tryAdvance((DoubleConsumer) e -> { }); i++) {
}
// 如果需要对所有剩余元素进行择取
if(to == count()) {
// 尝试用nodeBuilderSink逐个消费当前流迭代器中所有剩余元素
spliterator.forEachRemaining((DoubleConsumer) nodeBuilderSink);
// 只对剩余的部分元素进行择取
} else {
for(int i = 0; i<size && spliterator.tryAdvance((DoubleConsumer) nodeBuilderSink); i++) {
}
}
// 关闭sink链,结束本轮计算
nodeBuilderSink.end();
// 返回构造的Node
return nodeBuilderSink.build();
}
/**
* {@inheritDoc}
*
* @implSpec The default in {@code Node.OfDouble} returns
* {@code StreamShape.DOUBLE_VALUE}
*/
// 返回流的形状
default StreamShape getShape() {
return StreamShape.DOUBLE_VALUE;
}
// 创建size容量的double类型数组
@Override
default double[] newArray(int size) {
return new double[size];
}
}
/*▼ Node构建器-Sink ████████████████████████████████████████████████████████████████████████████████┓ */
/**
* A mutable builder for a {@code Node} that implements {@link Sink}, which builds a flat node containing the elements that have been pushed to it.
*/
/*
* Node构建器接口(引用类型版本)
*
* 实现了该接口的Node意味着:
* 1.构造Node需要使用工厂方法build();
* 2.Node兼具Sink的功能,即支持对上游发来的元素直接做出进一步的择取。
*/
interface Builder<T> extends Sink<T> {
/**
* Builds the node. Should be called after all elements have been
* pushed and signalled with an invocation of {@link Sink#end()}.
*
* @return the resulting {@code Node}
*/
// 构建Node的工厂方法
Node<T> build();
/**
* Specialized {@code Node.Builder} for int elements
*/
// Node构建器接口(int类型版本)
interface OfInt extends Node.Builder<Integer>, Sink.OfInt {
// 构建Node的工厂方法
@Override
Node.OfInt build();
}
/**
* Specialized {@code Node.Builder} for long elements
*/
// Node构建器接口(long类型版本)
interface OfLong extends Node.Builder<Long>, Sink.OfLong {
// 构建Node的工厂方法
@Override
Node.OfLong build();
}
/**
* Specialized {@code Node.Builder} for double elements
*/
// Node构建器接口(double类型版本)
interface OfDouble extends Node.Builder<Double>, Sink.OfDouble {
// 构建Node的工厂方法
@Override
Node.OfDouble build();
}
}
/*▲ Node构建器-Sink ████████████████████████████████████████████████████████████████████████████████┛ */
}