Some of tests for stream debugger failed on JDK 9.
The reasons are:
* The count() termination call does not produce any computations
* Stack traces include module name in some frames
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.debugger.streams.exec;
+import org.jetbrains.annotations.NotNull;
+
/**
* @author Vitaliy.Bibaev
*/
public class AccessibilityFailedTest extends FailEvaluationTestCase {
+ @NotNull
+ @Override
+ protected String replaceAdditionalInOutput(@NotNull String str) {
+ // stack traces in jdk 9 include module name. The following code removes module name from the stack trace.
+ return super.replaceAdditionalInOutput(str).replace("at java.base/", "at ");
+ }
/**
* Now, evaluation of such test case is not supported. MagicAccessorImpl cannot be parent for a subclass of the class "Super"
class ConcatenateOperationsTest : StreamExTestCase() {
override val packageName: String = "concatenate"
- fun testAppendToEmpty() = doStreamExWithResultTest()
- fun testAppendNone() = doStreamExWithResultTest()
- fun testAppendOne() = doStreamExWithResultTest()
- fun testAppendMany() = doStreamExWithResultTest()
+ fun testAppendToEmpty() = doStreamExVoidTest()
+ fun testAppendNone() = doStreamExVoidTest()
+ fun testAppendOne() = doStreamExVoidTest()
+ fun testAppendMany() = doStreamExVoidTest()
- fun testPrependToEmpty() = doStreamExWithResultTest()
- fun testPrependNone() = doStreamExWithResultTest()
- fun testPrependOne() = doStreamExWithResultTest()
- fun testPrependMany() = doStreamExWithResultTest()
+ fun testPrependToEmpty() = doStreamExVoidTest()
+ fun testPrependNone() = doStreamExVoidTest()
+ fun testPrependOne() = doStreamExVoidTest()
+ fun testPrependMany() = doStreamExVoidTest()
}
\ No newline at end of file
fun testElements() = doStreamExWithResultTest()
fun testMapToEntry() = doStreamExWithResultTest()
- fun testMapKeys() = doStreamExWithResultTest()
- fun testMapToKey() = doStreamExWithResultTest()
- fun testMapValues() = doStreamExWithResultTest()
- fun testMapToValue() = doStreamExWithResultTest()
+ fun testMapKeys() = doStreamExVoidTest()
+ fun testMapToKey() = doStreamExVoidTest()
+ fun testMapValues() = doStreamExVoidTest()
+ fun testMapToValue() = doStreamExVoidTest()
fun testMapKeyValue() = doStreamExWithResultTest()
- fun testInvert() = doStreamExWithResultTest()
+ fun testInvert() = doStreamExVoidTest()
- fun testKeys() = doStreamExWithResultTest()
+ fun testKeys() = doStreamExVoidTest()
fun testValues() = doStreamExWithResultTest()
fun testJoin() = doStreamExVoidTest()
fun testMapFirstOrElse() = doStreamExWithResultTest()
fun testMapLastOrElse() = doStreamExWithResultTest()
- fun testWithFirst() = doStreamExWithResultTest()
+ fun testWithFirst() = doStreamExVoidTest()
}
\ No newline at end of file
fun testSkipOrdered() = doStreamExWithResultTest()
- fun testParallel() = doStreamExWithResultTest()
+ fun testParallel() = doStreamExVoidTest()
- fun testZipWithSameSizes() = doStreamExWithResultTest()
- fun testZipWithLesser() = doStreamExWithResultTest()
- fun testZipWithGreater() = doStreamExWithResultTest()
+ fun testZipWithSameSizes() = doStreamExVoidTest()
+ fun testZipWithLesser() = doStreamExVoidTest()
+ fun testZipWithGreater() = doStreamExVoidTest()
fun testPrefix() = doStreamExVoidTest()
- fun testPrefixKeys() = doStreamExWithResultTest()
- fun testPrefixValues() = doStreamExWithResultTest()
+ fun testPrefixKeys() = doStreamExVoidTest()
+ fun testPrefixValues() = doStreamExVoidTest()
}
\ No newline at end of file
Map.java:6
Stream.of(1, 2, 3)
.map(x -> x * x)
-.count()
+.toArray()
map
before: 1,3,5
after: 2,4,6
-count
+toArray
before: 2,4,6
- after: nothing
+ after: 7,8,9
mappings for map
direct:
1 -> 2
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for toArray
direct:
- 2 -> nothing
- 4 -> nothing
- 6 -> nothing
+ 2 -> 7
+ 4 -> 8
+ 6 -> 9
reverse:
- empty
+ 2 <- 7
+ 4 <- 8
+ 6 <- 9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Nulls.java:6
Stream.of(null, null)
-.count()
-count
+.toArray()
+toArray
before: 1,2
- after: nothing
-mappings for count
+ after: 3,4
+mappings for toArray
direct:
- 1 -> nothing
- 2 -> nothing
+ 1 -> 3
+ 2 -> 4
reverse:
- empty
+ 1 <- 3
+ 2 <- 4
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
Peek.java:6
Stream.of(1, 2, 3)
.peek(x -> {})
-.count()
+.toArray()
peek
before: 1,3,5
after: 2,4,6
-count
+toArray
before: 2,4,6
- after: nothing
+ after: 7,8,9
mappings for peek
direct:
1 -> 2
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for toArray
direct:
- 2 -> nothing
- 4 -> nothing
- 6 -> nothing
+ 2 -> 7
+ 4 -> 8
+ 6 -> 9
reverse:
- empty
+ 2 <- 7
+ 4 <- 8
+ 6 <- 9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!RT_JAR! PrimitiveResultLong
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
PrimitiveResultLong.java:6
-IntStream.of(1, 2)
-.count()
+LongStream.of(1, 2)
+.sum()
Result type:long
-value = 2
-count
+value = 3
+sum
before: 1,2
after: nothing
-mappings for count
+mappings for sum
direct:
1 -> nothing
2 -> nothing
public class Map {
public static void main(String[] args) {
// Breakpoint!
- final long res = Stream.of(1, 2, 3).map(x -> x * x).count();
+ Stream.of(1, 2, 3).map(x -> x * x).toArray();
}
}
public class Nulls {
public static void main(String[] args) {
// Breakpoint!
- Stream.of(null, null).count();
+ Stream.of(null, null).toArray();
}
}
public class Peek {
public static void main(String[] args) {
// Breakpoint!
- final long res = Stream.of(1, 2, 3).peek(x -> {}).count();
+ Stream.of(1, 2, 3).peek(x -> {}).toArray();
}
}
-import java.util.stream.IntStream;
+import java.util.stream.LongStream;
public class PrimitiveResultLong {
public static void main(String[] args) {
// Breakpoint!
- long res = IntStream.of(1, 2).count();
+ long res = LongStream.of(1, 2).sum();
}
}
AppendMany.java:10
StreamEx.of(1, 2)
.append(Stream.of(3, 4, 5))
-.count()
+.forEach(x -> {})
append
before: 1,3
after: 2,4,5,6,7
-count
+forEach
before: 2,4,5,6,7
after: nothing
mappings for append
nothing <- 5
nothing <- 6
nothing <- 7
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-5
AppendNone.java:8
StreamEx.of(1, 2)
.append()
-.count()
+.forEach(x -> {})
append
before: 1,3
after: 2,4
-count
+forEach
before: 2,4
after: nothing
mappings for append
reverse:
1 <- 2
3 <- 4
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-2
AppendOne.java:8
StreamEx.of(1, 2)
.append(3)
-.count()
+.forEach(x -> {})
append
before: 1,3
after: 2,4,5
-count
+forEach
before: 2,4,5
after: nothing
mappings for append
1 <- 2
3 <- 4
nothing <- 5
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
AppendToEmpty.java:8
StreamEx.empty()
.append(1)
-.count()
+.forEach(x -> {})
append
before: nothing
after: 1
-count
+forEach
before: 1
after: nothing
mappings for append
empty
reverse:
nothing <- 1
-mappings for count
+mappings for forEach
direct:
1 -> nothing
reverse:
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-1
Invert.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.invert()
-.count()
+.forEach(x -> {})
invert
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for invert
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
Keys.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.keys()
-.count()
+.forEach(x -> {})
keys
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for keys
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
MapKeys.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.mapKeys(x -> x - 1)
-.count()
+.forEach(x -> {})
mapKeys
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for mapKeys
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
MapToEntry.java:8
StreamEx.of(1, 2, 3)
.mapToEntry(x -> x * x)
-.count()
+.toArray()
mapToEntry
before: 1,3,5
after: 2,4,6
-count
+toArray
before: 2,4,6
- after: nothing
+ after: 7,8,9
mappings for mapToEntry
direct:
1 -> 2
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for toArray
direct:
- 2 -> nothing
- 4 -> nothing
- 6 -> nothing
+ 2 -> 7
+ 4 -> 8
+ 6 -> 9
reverse:
- empty
+ 2 <- 7
+ 4 <- 8
+ 6 <- 9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
MapToKey.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.mapToKey((k, v) -> k + v)
-.count()
+.forEach(x -> {})
mapToKey
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for mapToKey
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
MapToValue.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.mapToValue((k, v) -> k + v)
-.count()
+.forEach(x -> {})
mapToValue
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for mapToValue
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
MapValues.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.mapValues(x -> 0)
-.count()
+.forEach(x -> {})
mapValues
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for mapValues
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
Parallel.java:11
StreamEx.of(1, 2, 3)
.parallel((ForkJoinPool) Executors.newWorkStealingPool())
-.count()
+.forEach(x -> {})
parallel
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for parallel
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
PrefixKeys.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.prefixKeys((l, r) -> l + r)
-.count()
+.forEach(x -> {})
prefixKeys
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for prefixKeys
nothing <- 2
nothing <- 4
nothing <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
PrefixValues.java:8
EntryStream.of(1, 1, 2, 4, 3, 9)
.prefixValues((l, r) -> l + r)
-.count()
+.forEach(x -> {})
prefixValues
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for prefixValues
nothing <- 2
nothing <- 4
nothing <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
PrependMany.java:10
StreamEx.of(1, 2)
.prepend(Stream.of(3, 4, 5))
-.count()
+.forEach(x -> {})
prepend
before: 4,6
after: 1,2,3,5,7
-count
+forEach
before: 1,2,3,5,7
after: nothing
mappings for prepend
nothing <- 3
4 <- 5
6 <- 7
-mappings for count
+mappings for forEach
direct:
1 -> nothing
2 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-5
PrependNone.java:8
StreamEx.of(1, 2)
.prepend()
-.count()
+.forEach(x -> {})
prepend
before: 1,3
after: 2,4
-count
+forEach
before: 2,4
after: nothing
mappings for prepend
reverse:
1 <- 2
3 <- 4
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-2
PrependOne.java:8
StreamEx.of(1, 2)
.prepend(3)
-.count()
+.forEach(x -> {})
prepend
before: 2,4
after: 1,3,5
-count
+forEach
before: 1,3,5
after: nothing
mappings for prepend
nothing <- 1
2 <- 3
4 <- 5
-mappings for count
+mappings for forEach
direct:
1 -> nothing
3 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
PrependToEmpty.java:8
StreamEx.empty()
.prepend(1)
-.count()
+.forEach(x -> {})
prepend
before: nothing
after: 1
-count
+forEach
before: 1
after: nothing
mappings for prepend
empty
reverse:
nothing <- 1
-mappings for count
+mappings for forEach
direct:
1 -> nothing
reverse:
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-1
WithFirst.java:8
StreamEx.of(10., 2., 3.)
.withFirst((first, other) -> first * other)
-.count()
+.forEach(x -> {})
withFirst
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for withFirst
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
ZipWithGreater.java:10
StreamEx.of(1, 2, 3)
.zipWith(Stream.of(1, 3, 9, 16, 25))
-.count()
+.forEach(x -> {})
zipWith
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for zipWith
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
ZipWithLesser.java:10
StreamEx.of(1, 2, 3, 4, 5)
.zipWith(Stream.of(1, 3, 9))
-.count()
+.forEach(x -> {})
zipWith
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for zipWith
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
ZipWithSameSizes.java:10
StreamEx.of(1, 2, 3)
.zipWith(Stream.of(1, 3, 9))
-.count()
+.forEach(x -> {})
zipWith
before: 1,3,5
after: 2,4,6
-count
+forEach
before: 2,4,6
after: nothing
mappings for zipWith
1 <- 2
3 <- 4
5 <- 6
-mappings for count
+mappings for forEach
direct:
2 -> nothing
4 -> nothing
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
-3
public class AppendMany {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).append(Stream.of(3, 4, 5)).count();
- System.out.println(count);
+ StreamEx.of(1, 2).append(Stream.of(3, 4, 5)).forEach(x -> {});
}
}
public class AppendNone {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).append().count();
- System.out.println(count);
+ StreamEx.of(1, 2).append().forEach(x -> {});
}
}
public class AppendOne {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).append(3).count();
- System.out.println(count);
+ StreamEx.of(1, 2).append(3).forEach(x -> {});
}
}
public class AppendToEmpty {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.empty().append(1).count();
- System.out.println(count);
+ StreamEx.empty().append(1).forEach(x -> {});
}
}
public class PrependMany {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).prepend(Stream.of(3, 4, 5)).count();
- System.out.println(count);
+ StreamEx.of(1, 2).prepend(Stream.of(3, 4, 5)).forEach(x -> {});
}
}
public class PrependNone {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).prepend().count();
- System.out.println(count);
+ StreamEx.of(1, 2).prepend().forEach(x -> {});
}
}
public class PrependOne {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2).prepend(3).count();
- System.out.println(count);
+ StreamEx.of(1, 2).prepend(3).forEach(x -> {});
}
}
public class PrependToEmpty {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.empty().prepend(1).count();
- System.out.println(count);
+ StreamEx.empty().prepend(1).forEach(x -> {});
}
}
public class Invert {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9).invert().count();
- System.out.println(count);
+ EntryStream.of(1, 1, 2, 4, 3, 9).invert().forEach(x -> {});
}
}
public class Keys {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9).keys().count();
- System.out.println(count);
+ EntryStream.of(1, 1, 2, 4, 3, 9).keys().forEach(x -> {});
}
}
public class MapKeys {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9).mapKeys(x -> x - 1).count();
- System.out.println(count);
+ EntryStream.of(1, 1, 2, 4, 3, 9).mapKeys(x -> x - 1).forEach(x -> {});
}
}
public class MapToEntry {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2, 3).mapToEntry(x -> x * x).count();
- System.out.println(count);
+ Object[] result = StreamEx.of(1, 2, 3).mapToEntry(x -> x * x).toArray();
+ System.out.println(result.length);
}
}
public class MapToKey {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9)
+ EntryStream.of(1, 1, 2, 4, 3, 9)
.mapToKey((k, v) -> k + v)
- .count();
- System.out.println(count);
+ .forEach(x -> {});
}
}
public class MapToValue {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9)
+ EntryStream.of(1, 1, 2, 4, 3, 9)
.mapToValue((k, v) -> k + v)
- .count();
- System.out.println(count);
+ .forEach(x -> {});
}
}
public class MapValues {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9)
+ EntryStream.of(1, 1, 2, 4, 3, 9)
.mapValues(x -> 0)
- .count();
- System.out.println(count);
+ .forEach(x -> {});
}
}
public class WithFirst {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(10., 2., 3.).withFirst((first, other) -> first * other).count();
- System.out.println(count);
+ StreamEx.of(10., 2., 3.).withFirst((first, other) -> first * other).forEach(x -> {});
}
}
public class Parallel {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2, 3).parallel((ForkJoinPool) Executors.newWorkStealingPool()).count();
- System.out.println(count);
+ StreamEx.of(1, 2, 3).parallel((ForkJoinPool) Executors.newWorkStealingPool()).forEach(x -> {});
}
}
public class PrefixKeys {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9).prefixKeys((l, r) -> l + r).count();
- System.out.println(count);
+ EntryStream.of(1, 1, 2, 4, 3, 9).prefixKeys((l, r) -> l + r).forEach(x -> {});
}
}
public class PrefixValues {
public static void main(String[] args) {
// Breakpoint!
- final long count = EntryStream.of(1, 1, 2, 4, 3, 9).prefixValues((l, r) -> l + r).count();
- System.out.println(count);
+ EntryStream.of(1, 1, 2, 4, 3, 9).prefixValues((l, r) -> l + r).forEach(x -> {});
}
}
public class ZipWithGreater {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9, 16, 25)).count();
- System.out.println(count);
+ StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9, 16, 25)).forEach(x -> {});
}
}
public class ZipWithLesser {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2, 3, 4, 5).zipWith(Stream.of(1, 3, 9)).count();
- System.out.println(count);
+ StreamEx.of(1, 2, 3, 4, 5).zipWith(Stream.of(1, 3, 9)).forEach(x -> {});
}
}
public class ZipWithSameSizes {
public static void main(String[] args) {
// Breakpoint!
- final long count = StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9)).count();
- System.out.println(count);
+ StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9)).forEach(x -> {});
}
}