Skip to content

Commit 6f66aa4

Browse files
committed
Added Stream.toJavaList
1 parent e83db7e commit 6f66aa4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/src/main/java/fj/data/Stream.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,12 @@ public final List<A> toList() {
894894
return buf.toList();
895895
}
896896

897+
/**
898+
* Returns a java.util.List projection of this stream.
899+
*/
900+
public final java.util.List<A> toJavaList() {
901+
return new java.util.LinkedList<A>(toCollection());
902+
}
897903

898904
/**
899905
* Returns a array projection of this stream.

0 commit comments

Comments
 (0)