@@ -221,52 +221,58 @@ with converterImpl.Priority1AccumulatorConverters
221
221
def parStream : LongStream = seqStream.parallel
222
222
}
223
223
224
- implicit val primitiveAccumulateDoubleStream = new PrimitiveStreamAccumulator [Stream [Double ], DoubleAccumulator ] {
225
- def streamAccumulate (stream : Stream [Double ]): DoubleAccumulator =
226
- stream.collect(DoubleAccumulator .supplier, DoubleAccumulator .boxedAdder, DoubleAccumulator .merger)
227
- }
228
-
229
- implicit val primitiveAccumulateDoubleStream2 =
224
+ implicit val primitiveAccumulateDoubleStream : PrimitiveStreamAccumulator [Stream [Double ], DoubleAccumulator ] =
225
+ new PrimitiveStreamAccumulator [Stream [Double ], DoubleAccumulator ] {
226
+ def streamAccumulate (stream : Stream [Double ]): DoubleAccumulator =
227
+ stream.collect(DoubleAccumulator .supplier, DoubleAccumulator .boxedAdder, DoubleAccumulator .merger)
228
+ }
229
+
230
+ implicit val primitiveAccumulateDoubleStream2 : PrimitiveStreamAccumulator [Stream [java.lang.Double ], DoubleAccumulator ] =
230
231
primitiveAccumulateDoubleStream.asInstanceOf [PrimitiveStreamAccumulator [Stream [java.lang.Double ], DoubleAccumulator ]]
231
-
232
- implicit val primitiveUnboxDoubleStream = new PrimitiveStreamUnboxer [Double , DoubleStream ] {
233
- def apply (boxed : Stream [Double ]): DoubleStream =
234
- boxed.mapToDouble(new java.util.function.ToDoubleFunction [Double ]{ def applyAsDouble (d : Double ) = d })
235
- }
236
-
237
- implicit val primitiveUnboxDoubleStream2 =
232
+
233
+ implicit val primitiveUnboxDoubleStream : PrimitiveStreamUnboxer [Double , DoubleStream ] =
234
+ new PrimitiveStreamUnboxer [Double , DoubleStream ] {
235
+ def apply (boxed : Stream [Double ]): DoubleStream =
236
+ boxed.mapToDouble(new java.util.function.ToDoubleFunction [Double ]{ def applyAsDouble (d : Double ) = d })
237
+ }
238
+
239
+ implicit val primitiveUnboxDoubleStream2 : PrimitiveStreamUnboxer [java.lang.Double , DoubleStream ] =
238
240
primitiveUnboxDoubleStream.asInstanceOf [PrimitiveStreamUnboxer [java.lang.Double , DoubleStream ]]
239
-
240
- implicit val primitiveAccumulateIntStream = new PrimitiveStreamAccumulator [Stream [Int ], IntAccumulator ] {
241
- def streamAccumulate (stream : Stream [Int ]): IntAccumulator =
242
- stream.collect(IntAccumulator .supplier, IntAccumulator .boxedAdder, IntAccumulator .merger)
243
- }
244
241
245
- implicit val primitiveAccumulateIntStream2 =
242
+ implicit val primitiveAccumulateIntStream : PrimitiveStreamAccumulator [Stream [Int ], IntAccumulator ] =
243
+ new PrimitiveStreamAccumulator [Stream [Int ], IntAccumulator ] {
244
+ def streamAccumulate (stream : Stream [Int ]): IntAccumulator =
245
+ stream.collect(IntAccumulator .supplier, IntAccumulator .boxedAdder, IntAccumulator .merger)
246
+ }
247
+
248
+ implicit val primitiveAccumulateIntStream2 : PrimitiveStreamAccumulator [Stream [java.lang.Integer ], IntAccumulator ] =
246
249
primitiveAccumulateIntStream.asInstanceOf [PrimitiveStreamAccumulator [Stream [java.lang.Integer ], IntAccumulator ]]
247
-
248
- implicit val primitiveUnboxIntStream = new PrimitiveStreamUnboxer [Int , IntStream ] {
249
- def apply (boxed : Stream [Int ]): IntStream =
250
- boxed.mapToInt(new java.util.function.ToIntFunction [Int ]{ def applyAsInt (d : Int ) = d })
251
- }
252
-
253
- implicit val primitiveUnboxIntStream2 =
250
+
251
+ implicit val primitiveUnboxIntStream : PrimitiveStreamUnboxer [Int , IntStream ] =
252
+ new PrimitiveStreamUnboxer [Int , IntStream ] {
253
+ def apply (boxed : Stream [Int ]): IntStream =
254
+ boxed.mapToInt(new java.util.function.ToIntFunction [Int ]{ def applyAsInt (d : Int ) = d })
255
+ }
256
+
257
+ implicit val primitiveUnboxIntStream2 : PrimitiveStreamUnboxer [java.lang.Integer , IntStream ] =
254
258
primitiveUnboxIntStream.asInstanceOf [PrimitiveStreamUnboxer [java.lang.Integer , IntStream ]]
255
-
256
- implicit val primitiveAccumulateLongStream = new PrimitiveStreamAccumulator [Stream [Long ], LongAccumulator ] {
257
- def streamAccumulate (stream : Stream [Long ]): LongAccumulator =
258
- stream.collect(LongAccumulator .supplier, LongAccumulator .boxedAdder, LongAccumulator .merger)
259
- }
260
259
261
- implicit val primitiveAccumulateLongStream2 =
260
+ implicit val primitiveAccumulateLongStream : PrimitiveStreamAccumulator [Stream [Long ], LongAccumulator ] =
261
+ new PrimitiveStreamAccumulator [Stream [Long ], LongAccumulator ] {
262
+ def streamAccumulate (stream : Stream [Long ]): LongAccumulator =
263
+ stream.collect(LongAccumulator .supplier, LongAccumulator .boxedAdder, LongAccumulator .merger)
264
+ }
265
+
266
+ implicit val primitiveAccumulateLongStream2 : PrimitiveStreamAccumulator [Stream [java.lang.Long ], LongAccumulator ] =
262
267
primitiveAccumulateLongStream.asInstanceOf [PrimitiveStreamAccumulator [Stream [java.lang.Long ], LongAccumulator ]]
263
-
264
- implicit val primitiveUnboxLongStream = new PrimitiveStreamUnboxer [Long , LongStream ] {
265
- def apply (boxed : Stream [Long ]): LongStream =
266
- boxed.mapToLong(new java.util.function.ToLongFunction [Long ]{ def applyAsLong (d : Long ) = d })
267
- }
268
-
269
- implicit val primitiveUnboxLongStream2 =
268
+
269
+ implicit val primitiveUnboxLongStream : PrimitiveStreamUnboxer [Long , LongStream ] =
270
+ new PrimitiveStreamUnboxer [Long , LongStream ] {
271
+ def apply (boxed : Stream [Long ]): LongStream =
272
+ boxed.mapToLong(new java.util.function.ToLongFunction [Long ]{ def applyAsLong (d : Long ) = d })
273
+ }
274
+
275
+ implicit val primitiveUnboxLongStream2 : PrimitiveStreamUnboxer [java.lang.Long , LongStream ] =
270
276
primitiveUnboxLongStream.asInstanceOf [PrimitiveStreamUnboxer [java.lang.Long , LongStream ]]
271
277
272
278
implicit final class RichDoubleStream (private val stream : DoubleStream ) extends AnyVal {
@@ -308,27 +314,30 @@ with converterImpl.Priority1AccumulatorConverters
308
314
}
309
315
}
310
316
311
- implicit val accumulateDoubleStepper = new AccumulatesFromStepper [Double , DoubleAccumulator ] {
312
- def apply (stepper : Stepper [Double ]) = {
313
- val a = new DoubleAccumulator
314
- while (stepper.hasStep) a += stepper.nextStep
315
- a
317
+ implicit val accumulateDoubleStepper : AccumulatesFromStepper [Double , DoubleAccumulator ] =
318
+ new AccumulatesFromStepper [Double , DoubleAccumulator ] {
319
+ def apply (stepper : Stepper [Double ]) = {
320
+ val a = new DoubleAccumulator
321
+ while (stepper.hasStep) a += stepper.nextStep
322
+ a
323
+ }
316
324
}
317
- }
318
325
319
- implicit val accumulateIntStepper = new AccumulatesFromStepper [Int , IntAccumulator ] {
320
- def apply (stepper : Stepper [Int ]) = {
321
- val a = new IntAccumulator
322
- while (stepper.hasStep) a += stepper.nextStep
323
- a
326
+ implicit val accumulateIntStepper : AccumulatesFromStepper [Int , IntAccumulator ] =
327
+ new AccumulatesFromStepper [Int , IntAccumulator ] {
328
+ def apply (stepper : Stepper [Int ]) = {
329
+ val a = new IntAccumulator
330
+ while (stepper.hasStep) a += stepper.nextStep
331
+ a
332
+ }
324
333
}
325
- }
326
334
327
- implicit val accumulateLongStepper = new AccumulatesFromStepper [Long , LongAccumulator ] {
328
- def apply (stepper : Stepper [Long ]) = {
329
- val a = new LongAccumulator
330
- while (stepper.hasStep) a += stepper.nextStep
331
- a
335
+ implicit val accumulateLongStepper : AccumulatesFromStepper [Long , LongAccumulator ] =
336
+ new AccumulatesFromStepper [Long , LongAccumulator ] {
337
+ def apply (stepper : Stepper [Long ]) = {
338
+ val a = new LongAccumulator
339
+ while (stepper.hasStep) a += stepper.nextStep
340
+ a
341
+ }
332
342
}
333
- }
334
343
}
0 commit comments