@@ -16,7 +16,8 @@ trait PrimitiveStreamUnboxer[A, S] {
16
16
17
17
trait Priority5StreamConverters {
18
18
// Note--conversion is only to make sure implicit conversion priority is lower than alternatives.
19
- implicit class EnrichScalaCollectionWithSeqStream [A , CC ](cc : CC )(implicit steppize : CC => MakesAnySeqStepper [A ]) {
19
+ implicit class EnrichScalaCollectionWithSeqStream [A , CC ](cc : CC )(implicit steppize : CC => MakesAnySeqStepper [A ])
20
+ extends MakesSequentialStream [A , Stream [A ]] {
20
21
def seqStream : Stream [A ] = StreamSupport .stream(steppize(cc).stepper, false )
21
22
}
22
23
implicit class EnrichScalaCollectionWithKeySeqStream [K , CC ](cc : CC )(implicit steppize : CC => MakesAnyKeySeqStepper [K ]) {
@@ -28,13 +29,16 @@ trait Priority5StreamConverters {
28
29
}
29
30
30
31
trait Priority4StreamConverters extends Priority5StreamConverters {
31
- implicit class EnrichScalaCollectionWithSeqDoubleStream [CC ](cc : CC )(implicit steppize : CC => MakesDoubleSeqStepper ) {
32
+ implicit class EnrichScalaCollectionWithSeqDoubleStream [CC ](cc : CC )(implicit steppize : CC => MakesDoubleSeqStepper )
33
+ extends MakesSequentialStream [java.lang.Double , DoubleStream ] {
32
34
def seqStream : DoubleStream = StreamSupport .doubleStream(steppize(cc).stepper, false )
33
35
}
34
- implicit class EnrichScalaCollectionWithSeqIntStream [CC ](cc : CC )(implicit steppize : CC => MakesIntSeqStepper ) {
36
+ implicit class EnrichScalaCollectionWithSeqIntStream [CC ](cc : CC )(implicit steppize : CC => MakesIntSeqStepper )
37
+ extends MakesSequentialStream [java.lang.Integer , IntStream ] {
35
38
def seqStream : IntStream = StreamSupport .intStream(steppize(cc).stepper, false )
36
39
}
37
- implicit class EnrichScalaCollectionWithSeqLongStream [CC ](cc : CC )(implicit steppize : CC => MakesLongSeqStepper ) {
40
+ implicit class EnrichScalaCollectionWithSeqLongStream [CC ](cc : CC )(implicit steppize : CC => MakesLongSeqStepper )
41
+ extends MakesSequentialStream [java.lang.Long , LongStream ] {
38
42
def seqStream : LongStream = StreamSupport .longStream(steppize(cc).stepper, false )
39
43
}
40
44
implicit class EnrichScalaCollectionWithSeqDoubleKeyStream [CC ](cc : CC )(implicit steppize : CC => MakesDoubleKeySeqStepper ) {
@@ -58,7 +62,8 @@ trait Priority4StreamConverters extends Priority5StreamConverters {
58
62
}
59
63
60
64
trait Priority3StreamConverters extends Priority4StreamConverters {
61
- implicit class EnrichAnySteppableWithStream [A , CC ](cc : CC )(implicit steppize : CC => MakesAnyStepper [A ]) {
65
+ implicit class EnrichAnySteppableWithStream [A , CC ](cc : CC )(implicit steppize : CC => MakesAnyStepper [A ])
66
+ extends MakesSequentialStream [A , Stream [A ]] with MakesParallelStream [A , Stream [A ]] {
62
67
def seqStream : Stream [A ] = StreamSupport .stream(steppize(cc).stepper, false )
63
68
def parStream : Stream [A ] = StreamSupport .stream(steppize(cc).stepper.anticipateParallelism, true )
64
69
}
@@ -73,7 +78,8 @@ trait Priority3StreamConverters extends Priority4StreamConverters {
73
78
}
74
79
75
80
trait Priority2StreamConverters extends Priority3StreamConverters {
76
- implicit class EnrichDoubleSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesDoubleStepper ) {
81
+ implicit class EnrichDoubleSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesDoubleStepper )
82
+ extends MakesSequentialStream [java.lang.Double , DoubleStream ] with MakesParallelStream [java.lang.Double , DoubleStream ] {
77
83
def seqStream : DoubleStream = StreamSupport .doubleStream(steppize(cc).stepper, false )
78
84
def parStream : DoubleStream = StreamSupport .doubleStream(steppize(cc).stepper.anticipateParallelism, true )
79
85
}
@@ -85,7 +91,8 @@ trait Priority2StreamConverters extends Priority3StreamConverters {
85
91
def seqValueStream : DoubleStream = StreamSupport .doubleStream(steppize(cc).valueStepper, false )
86
92
def parValueStream : DoubleStream = StreamSupport .doubleStream(steppize(cc).valueStepper.anticipateParallelism, true )
87
93
}
88
- implicit class EnrichIntSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesIntStepper ) {
94
+ implicit class EnrichIntSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesIntStepper )
95
+ extends MakesSequentialStream [java.lang.Integer , IntStream ] with MakesParallelStream [java.lang.Integer , IntStream ] {
89
96
def seqStream : IntStream = StreamSupport .intStream(steppize(cc).stepper, false )
90
97
def parStream : IntStream = StreamSupport .intStream(steppize(cc).stepper.anticipateParallelism, true )
91
98
}
@@ -97,7 +104,8 @@ trait Priority2StreamConverters extends Priority3StreamConverters {
97
104
def seqValueStream : IntStream = StreamSupport .intStream(steppize(cc).valueStepper, false )
98
105
def parValueStream : IntStream = StreamSupport .intStream(steppize(cc).valueStepper.anticipateParallelism, true )
99
106
}
100
- implicit class EnrichLongSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesLongStepper ) {
107
+ implicit class EnrichLongSteppableWithStream [CC ](cc : CC )(implicit steppize : CC => MakesLongStepper )
108
+ extends MakesSequentialStream [java.lang.Long , LongStream ] with MakesParallelStream [java.lang.Long , LongStream ] {
101
109
def seqStream : LongStream = StreamSupport .longStream(steppize(cc).stepper, false )
102
110
def parStream : LongStream = StreamSupport .longStream(steppize(cc).stepper.anticipateParallelism, true )
103
111
}
@@ -200,17 +208,20 @@ extends Priority1StreamConverters
200
208
with converterImpl.Priority1StepConverters
201
209
with converterImpl.Priority1AccumulatorConverters
202
210
{
203
- implicit class EnrichDoubleArrayWithStream (a : Array [Double ]) {
211
+ implicit class EnrichDoubleArrayWithStream (a : Array [Double ])
212
+ extends MakesSequentialStream [java.lang.Double , DoubleStream ] with MakesParallelStream [java.lang.Double , DoubleStream ] {
204
213
def seqStream : DoubleStream = java.util.Arrays .stream(a)
205
214
def parStream : DoubleStream = seqStream.parallel
206
215
}
207
216
208
- implicit class EnrichIntArrayWithStream (a : Array [Int ]) {
217
+ implicit class EnrichIntArrayWithStream (a : Array [Int ])
218
+ extends MakesSequentialStream [java.lang.Integer , IntStream ] with MakesParallelStream [java.lang.Integer , IntStream ] {
209
219
def seqStream : IntStream = java.util.Arrays .stream(a)
210
220
def parStream : IntStream = seqStream.parallel
211
221
}
212
222
213
- implicit class EnrichLongArrayWithStream (a : Array [Long ]) {
223
+ implicit class EnrichLongArrayWithStream (a : Array [Long ])
224
+ extends MakesSequentialStream [java.lang.Long , LongStream ] with MakesParallelStream [java.lang.Long , LongStream ] {
214
225
def seqStream : LongStream = java.util.Arrays .stream(a)
215
226
def parStream : LongStream = seqStream.parallel
216
227
}
0 commit comments