1212import java .util .concurrent .*;
1313
1414import static fj .data .Option .some ;
15- import static fj .data .Stream .fromIterable ;
1615import static fj .data .Stream .iterableStream ;
1716import static fj .data .Zipper .fromStream ;
1817
@@ -559,7 +558,7 @@ static public <A, B> F<P2<A, A>, P2<B, B>> mapBoth(final F<A, B> f) {
559558 */
560559 static public <A , B > SynchronousQueue <B > mapJ (final F <A , B > f , final SynchronousQueue <A > as ) {
561560 final SynchronousQueue <B > bs = new SynchronousQueue <B >();
562- bs .addAll (fromIterable (as ).map (f ).toCollection ());
561+ bs .addAll (iterableStream (as ).map (f ).toCollection ());
563562 return bs ;
564563 }
565564
@@ -571,7 +570,7 @@ static public <A, B> SynchronousQueue<B> mapJ(final F<A, B> f, final Synchronous
571570 * @return A new PriorityBlockingQueue with this function applied to each element.
572571 */
573572 static public <A , B > PriorityBlockingQueue <B > mapJ (final F <A , B > f , final PriorityBlockingQueue <A > as ) {
574- return new PriorityBlockingQueue <B >(fromIterable (as ).map (f ).toCollection ());
573+ return new PriorityBlockingQueue <B >(iterableStream (as ).map (f ).toCollection ());
575574 }
576575
577576 /**
@@ -581,7 +580,7 @@ static public <A, B> PriorityBlockingQueue<B> mapJ(final F<A, B> f, final Priori
581580 * @return A new LinkedBlockingQueue with this function applied to each element.
582581 */
583582 static public <A , B > LinkedBlockingQueue <B > mapJ (final F <A , B > f , final LinkedBlockingQueue <A > as ) {
584- return new LinkedBlockingQueue <B >(fromIterable (as ).map (f ).toCollection ());
583+ return new LinkedBlockingQueue <B >(iterableStream (as ).map (f ).toCollection ());
585584 }
586585
587586 /**
@@ -591,7 +590,7 @@ static public <A, B> LinkedBlockingQueue<B> mapJ(final F<A, B> f, final LinkedBl
591590 * @return A new CopyOnWriteArraySet with this function applied to each element.
592591 */
593592 static public <A , B > CopyOnWriteArraySet <B > mapJ (final F <A , B > f , final CopyOnWriteArraySet <A > as ) {
594- return new CopyOnWriteArraySet <B >(fromIterable (as ).map (f ).toCollection ());
593+ return new CopyOnWriteArraySet <B >(iterableStream (as ).map (f ).toCollection ());
595594 }
596595
597596 /**
@@ -601,7 +600,7 @@ static public <A, B> CopyOnWriteArraySet<B> mapJ(final F<A, B> f, final CopyOnWr
601600 * @return A new CopyOnWriteArrayList with this function applied to each element.
602601 */
603602 static public <A , B > CopyOnWriteArrayList <B > mapJ (final F <A , B > f , final CopyOnWriteArrayList <A > as ) {
604- return new CopyOnWriteArrayList <B >(fromIterable (as ).map (f ).toCollection ());
603+ return new CopyOnWriteArrayList <B >(iterableStream (as ).map (f ).toCollection ());
605604 }
606605
607606 /**
@@ -611,7 +610,7 @@ static public <A, B> CopyOnWriteArrayList<B> mapJ(final F<A, B> f, final CopyOnW
611610 * @return A new ConcurrentLinkedQueue with this function applied to each element.
612611 */
613612 static public <A , B > ConcurrentLinkedQueue <B > mapJ (final F <A , B > f , final ConcurrentLinkedQueue <A > as ) {
614- return new ConcurrentLinkedQueue <B >(fromIterable (as ).map (f ).toCollection ());
613+ return new ConcurrentLinkedQueue <B >(iterableStream (as ).map (f ).toCollection ());
615614 }
616615
617616 /**
@@ -622,7 +621,7 @@ static public <A, B> ConcurrentLinkedQueue<B> mapJ(final F<A, B> f, final Concur
622621 */
623622 static public <A , B > ArrayBlockingQueue <B > mapJ (final F <A , B > f , final ArrayBlockingQueue <A > as ) {
624623 final ArrayBlockingQueue <B > bs = new ArrayBlockingQueue <B >(as .size ());
625- bs .addAll (fromIterable (as ).map (f ).toCollection ());
624+ bs .addAll (iterableStream (as ).map (f ).toCollection ());
626625 return bs ;
627626 }
628627
@@ -634,7 +633,7 @@ static public <A, B> ArrayBlockingQueue<B> mapJ(final F<A, B> f, final ArrayBloc
634633 * @return A new TreeSet with this function applied to each element.
635634 */
636635 static public <A , B > TreeSet <B > mapJ (final F <A , B > f , final TreeSet <A > as ) {
637- return new TreeSet <B >(fromIterable (as ).map (f ).toCollection ());
636+ return new TreeSet <B >(iterableStream (as ).map (f ).toCollection ());
638637 }
639638
640639 /**
@@ -644,7 +643,7 @@ static public <A, B> TreeSet<B> mapJ(final F<A, B> f, final TreeSet<A> as) {
644643 * @return A new PriorityQueue with this function applied to each element.
645644 */
646645 static public <A , B > PriorityQueue <B > mapJ (final F <A , B > f , final PriorityQueue <A > as ) {
647- return new PriorityQueue <B >(fromIterable (as ).map (f ).toCollection ());
646+ return new PriorityQueue <B >(iterableStream (as ).map (f ).toCollection ());
648647 }
649648
650649 /**
@@ -654,7 +653,7 @@ static public <A, B> PriorityQueue<B> mapJ(final F<A, B> f, final PriorityQueue<
654653 * @return A new LinkedList with this function applied to each element.
655654 */
656655 static public <A , B > LinkedList <B > mapJ (final F <A , B > f , final LinkedList <A > as ) {
657- return new LinkedList <B >(fromIterable (as ).map (f ).toCollection ());
656+ return new LinkedList <B >(iterableStream (as ).map (f ).toCollection ());
658657 }
659658
660659 /**
@@ -664,7 +663,7 @@ static public <A, B> LinkedList<B> mapJ(final F<A, B> f, final LinkedList<A> as)
664663 * @return A new ArrayList with this function applied to each element.
665664 */
666665 static public <A , B > ArrayList <B > mapJ (final F <A , B > f , final ArrayList <A > as ) {
667- return new ArrayList <B >(fromIterable (as ).map (f ).toCollection ());
666+ return new ArrayList <B >(iterableStream (as ).map (f ).toCollection ());
668667 }
669668
670669 static public <A , B , C > F <A , C > map (F <A , B > target , F <B , C > f ) {
0 commit comments