Files
openide/java/java-tests/testData/inspection/streamApiCallChains/beforeStreamSupport.java
T
2017-02-03 10:40:11 +03:00

16 lines
705 B
Java

// "Fix all 'Simplify stream API call chains' problems in file" "true"
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.StreamSupport;
public class Test {
public static void test(List<String> list, Collection<Number> collection, Iterable<Integer> iterable) {
StreamSupport.str<caret>eam(list.spliterator(), false).filter(Objects::nonNull).forEach(System.out::println);
StreamSupport.stream(collection.spliterator(), true).forEach(System.out::println);
StreamSupport.stream(iterable.spliterator(), true).forEach(System.out::println);
StreamSupport.stream(list.spliterator(), collection.isEmpty()).forEach(System.out::println);
}
}