@@ -6,6 +6,7 @@ import scala.collection.generic.CanBuildFrom
6
6
import scala .compat .java8 .StreamConverters ._
7
7
import scala .compat .java8 .collectionImpl ._
8
8
import scala .compat .java8 .converterImpl ._
9
+ import scala .compat .java8 .{MakesSequentialStream , MakesParallelStream }
9
10
10
11
package object generate {
11
12
private def myInty (n : Int ) = 0 until n
@@ -25,42 +26,42 @@ package object generate {
25
26
}
26
27
27
28
object Pstep {
28
- def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [IntStepper with EfficientSubstep ]): IntStepper =
29
+ def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [Int , EfficientSubstep ]): IntStepper =
29
30
steppize(cc).stepper
30
- def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [AnyStepper [ String ] with EfficientSubstep ]): AnyStepper [String ] =
31
+ def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [String , EfficientSubstep ]): AnyStepper [String ] =
31
32
steppize(cc).stepper
32
33
}
33
34
34
35
object Sstep {
35
- def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [IntStepper ]): IntStepper =
36
+ def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [Int , Any ]): IntStepper =
36
37
steppize(cc).stepper
37
- def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [AnyStepper [ String ] ]): AnyStepper [String ] =
38
+ def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [String , Any ]): AnyStepper [String ] =
38
39
steppize(cc).stepper
39
40
}
40
41
41
42
object PsStream {
42
- def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [IntStepper with EfficientSubstep ]): IntStream =
43
+ def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [Int , EfficientSubstep ]): IntStream =
43
44
steppize(cc).stepper.parStream
44
- def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [AnyStepper [ String ] with EfficientSubstep ]): Stream [String ] =
45
+ def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [String , EfficientSubstep ]): Stream [String ] =
45
46
steppize(cc).stepper.parStream
46
47
}
47
48
48
49
object SsStream {
49
- def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [IntStepper ]): IntStream =
50
+ def i [CC ](cc : CC )(implicit steppize : CC => MakesStepper [Int , Any ]): IntStream =
50
51
steppize(cc).stepper.seqStream
51
- def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [AnyStepper [ String ] ]): Stream [String ] =
52
+ def s [CC ](cc : CC )(implicit steppize : CC => MakesStepper [String , Any ]): Stream [String ] =
52
53
steppize(cc).stepper.seqStream
53
54
}
54
55
55
56
object Sstream {
56
- def i [CC ](cc : CC )(implicit streamize : CC => MakesSequentialStream [java.lang. Integer , IntStream ]) =
57
+ def i [CC ](cc : CC )(implicit streamize : CC => MakesSequentialStream [Int , IntStream ]) =
57
58
streamize(cc).seqStream
58
59
def s [CC ](cc : CC )(implicit streamize : CC => MakesSequentialStream [String , Stream [String ]]) =
59
60
streamize(cc).seqStream
60
61
}
61
62
62
63
object Pstream {
63
- def i [CC ](cc : CC )(implicit streamize : CC => MakesParallelStream [java.lang. Integer , IntStream ]) =
64
+ def i [CC ](cc : CC )(implicit streamize : CC => MakesParallelStream [Int , IntStream ]) =
64
65
streamize(cc).parStream
65
66
def s [CC ](cc : CC )(implicit streamize : CC => MakesParallelStream [String , Stream [String ]]) =
66
67
streamize(cc).parStream
@@ -78,14 +79,14 @@ package object generate {
78
79
// Iterator
79
80
def iI (j : Int )(implicit x : CC [Int ] => Iterator [Int ]) = x(cI(j))
80
81
// Steppers (second letter--s = sequential, p = parallel)
81
- def tsI (j : Int )(implicit x : CC [Int ] => MakesStepper [IntStepper ]) = Sstep i cI(j)
82
- def tpI (j : Int )(implicit x : CC [Int ] => MakesStepper [IntStepper with EfficientSubstep ]) = Pstep i cI(j)
82
+ def tsI (j : Int )(implicit x : CC [Int ] => MakesStepper [Int , Any ]) = Sstep i cI(j)
83
+ def tpI (j : Int )(implicit x : CC [Int ] => MakesStepper [Int , EfficientSubstep ]) = Pstep i cI(j)
83
84
// Streams
84
- def ssI (j : Int )(implicit x : CC [Int ] => MakesSequentialStream [java.lang. Integer , IntStream ]) = Sstream i cI(j)
85
- def spI (j : Int )(implicit x : CC [Int ] => MakesParallelStream [java.lang. Integer , IntStream ]) = Pstream i cI(j)
85
+ def ssI (j : Int )(implicit x : CC [Int ] => MakesSequentialStream [Int , IntStream ]) = Sstream i cI(j)
86
+ def spI (j : Int )(implicit x : CC [Int ] => MakesParallelStream [Int , IntStream ]) = Pstream i cI(j)
86
87
// Streams via steppers
87
- def zsI (j : Int )(implicit x : CC [Int ] => MakesStepper [IntStepper ]) = SsStream i cI(j)
88
- def zpI (j : Int )(implicit x : CC [Int ] => MakesStepper [IntStepper with EfficientSubstep ]) = PsStream i cI(j)
88
+ def zsI (j : Int )(implicit x : CC [Int ] => MakesStepper [Int , Any ]) = SsStream i cI(j)
89
+ def zpI (j : Int )(implicit x : CC [Int ] => MakesStepper [Int , EfficientSubstep ]) = PsStream i cI(j)
89
90
}
90
91
91
92
trait StringThingsOf [CC [_]] extends GenThingsOf [CC ] {
@@ -95,14 +96,14 @@ package object generate {
95
96
// Iterator
96
97
def iS (j : Int )(implicit x : CC [String ] => Iterator [String ]) = x(cS(j))
97
98
// Steppers (second letter--s = sequential, p = parallel)
98
- def tsS (j : Int )(implicit x : CC [String ] => MakesStepper [AnyStepper [ String ] ]) = Sstep s cS(j)
99
- def tpS (j : Int )(implicit x : CC [String ] => MakesStepper [AnyStepper [ String ] with EfficientSubstep ]) = Pstep s cS(j)
99
+ def tsS (j : Int )(implicit x : CC [String ] => MakesStepper [String , Any ]) = Sstep s cS(j)
100
+ def tpS (j : Int )(implicit x : CC [String ] => MakesStepper [String , EfficientSubstep ]) = Pstep s cS(j)
100
101
// Streams
101
102
def ssS (j : Int )(implicit x : CC [String ] => MakesSequentialStream [String , Stream [String ]]) = Sstream s cS(j)
102
103
def spS (j : Int )(implicit x : CC [String ] => MakesParallelStream [String , Stream [String ]]) = Pstream s cS(j)
103
104
// Streams via steppers
104
- def zsS (j : Int )(implicit x : CC [String ] => MakesStepper [AnyStepper [ String ] ]) = SsStream s cS(j)
105
- def zpS (j : Int )(implicit x : CC [String ] => MakesStepper [AnyStepper [ String ] with EfficientSubstep ]) = PsStream s cS(j)
105
+ def zsS (j : Int )(implicit x : CC [String ] => MakesStepper [String , Any ]) = SsStream s cS(j)
106
+ def zpS (j : Int )(implicit x : CC [String ] => MakesStepper [String , EfficientSubstep ]) = PsStream s cS(j)
106
107
}
107
108
108
109
trait ThingsOf [CC [_]] extends IntThingsOf [CC ] with StringThingsOf [CC ] {}
@@ -158,16 +159,16 @@ package object generate {
158
159
159
160
// Streams from ArrayList (Java)
160
161
161
- implicit val getsParStreamFromArrayListInt : (java.util.ArrayList [Int ] => MakesParallelStream [java.lang. Integer , IntStream ]) = ali => {
162
- new MakesParallelStream [java.lang. Integer , IntStream ] {
162
+ implicit val getsParStreamFromArrayListInt : (java.util.ArrayList [Int ] => MakesParallelStream [Int , IntStream ]) = ali => {
163
+ new MakesParallelStream [Int , IntStream ] {
163
164
def parStream : IntStream = ali.
164
165
asInstanceOf [java.util.ArrayList [java.lang.Integer ]].
165
166
parallelStream.parallel.
166
167
mapToInt(new java.util.function.ToIntFunction [java.lang.Integer ]{ def applyAsInt (i : java.lang.Integer ) = i.intValue })
167
168
}
168
169
}
169
- implicit val getsSeqStreamFromArrayListInt : (java.util.ArrayList [Int ] => MakesSequentialStream [java.lang. Integer , IntStream ]) = ali => {
170
- new MakesSequentialStream [java.lang. Integer , IntStream ] {
170
+ implicit val getsSeqStreamFromArrayListInt : (java.util.ArrayList [Int ] => MakesSequentialStream [Int , IntStream ]) = ali => {
171
+ new MakesSequentialStream [Int , IntStream ] {
171
172
def seqStream : IntStream = ali.
172
173
asInstanceOf [java.util.ArrayList [java.lang.Integer ]].
173
174
stream().
@@ -187,16 +188,16 @@ package object generate {
187
188
188
189
// Streams from LinkedList (Java)
189
190
190
- implicit val getsParStreamFromLinkedListInt : (java.util.LinkedList [Int ] => MakesParallelStream [java.lang. Integer , IntStream ]) = ali => {
191
- new MakesParallelStream [java.lang. Integer , IntStream ] {
191
+ implicit val getsParStreamFromLinkedListInt : (java.util.LinkedList [Int ] => MakesParallelStream [Int , IntStream ]) = ali => {
192
+ new MakesParallelStream [Int , IntStream ] {
192
193
def parStream : IntStream = ali.
193
194
asInstanceOf [java.util.LinkedList [java.lang.Integer ]].
194
195
parallelStream.parallel.
195
196
mapToInt(new java.util.function.ToIntFunction [java.lang.Integer ]{ def applyAsInt (i : java.lang.Integer ) = i.intValue })
196
197
}
197
198
}
198
- implicit val getsSeqStreamFromLinkedListInt : (java.util.LinkedList [Int ] => MakesSequentialStream [java.lang. Integer , IntStream ]) = ali => {
199
- new MakesSequentialStream [java.lang. Integer , IntStream ] {
199
+ implicit val getsSeqStreamFromLinkedListInt : (java.util.LinkedList [Int ] => MakesSequentialStream [Int , IntStream ]) = ali => {
200
+ new MakesSequentialStream [Int , IntStream ] {
200
201
def seqStream : IntStream = ali.
201
202
asInstanceOf [java.util.LinkedList [java.lang.Integer ]].
202
203
stream().
0 commit comments