File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
java8/src/main/java/fj/data Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 66import fj .function .Try2 ;
77
88import java .util .Optional ;
9+ import java .util .Spliterator ;
10+ import java .util .Spliterators ;
911import java .util .function .BiFunction ;
1012import java .util .function .Consumer ;
1113import java .util .function .Function ;
1214import java .util .function .Supplier ;
15+ import java .util .stream .StreamSupport ;
1316
1417/**
1518 * Created by mperry on 3/06/2014.
@@ -119,5 +122,13 @@ public static <A> F<A, Unit> Consumer_F(Consumer<A> c) {
119122 };
120123 }
121124
125+ static public <A > java .util .stream .Stream <A > Stream_JStream (fj .data .Stream <A > s ) {
126+ Spliterator <A > sit = Spliterators .spliteratorUnknownSize (s .iterator (), 0 );
127+ return StreamSupport .stream (sit , false );
128+ }
129+
130+ static public <A > F <fj .data .Stream <A >, java .util .stream .Stream <A >> Stream_JStream () {
131+ return s -> Stream_JStream (s );
132+ }
122133
123134}
You can’t perform that action at this time.
0 commit comments