We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bea1d39 commit af5de57Copy full SHA for af5de57
src/test/java/scala/compat/java8/StreamConvertersExampleTest.java
@@ -0,0 +1,20 @@
1
+/*
2
+ * Copyright (C) 2016 Typesafe Inc. <http://www.typesafe.com>
3
+ */
4
+
5
+import org.junit.Test;
6
7
+import scala.collection.mutable.ArrayBuffer;
8
+import scala.compat.java8.ScalaStreaming;
9
10
11
+public class StreamConvertersExampleTest {
12
+ @Test
13
+ public void MakeAndUseArrayBuffer() {
14
+ ArrayBuffer<String> ab = new ArrayBuffer<String>();
15
+ ab.$plus$eq("salmon");
16
+ ab.$plus$eq("herring");
17
+ assert( ScalaStreaming.from(ab).mapToInt(x -> x.length()).sum() == 13 );
18
+ }
19
+}
20
0 commit comments