Stream.of("one", "two", "three", "four")
.filter(e -> e.length() > 3)
.peek(e -> System.out.println("Filtered...和skip
Stream.of(1,2,3,4,5).limit(10).skip(3).collect(Collectors.toList()).forEach(System.out::println...);
3.5 排序后遍历: sorted
Stream.of(5,4,3,2,1).sorted((p1,p2) -> p1.compareTo(p2)).limit(10).skip(3).collect...并行操作
parallelStream 是流并行处理程序的代替方法.
long count = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl...").parallelStream().filter(string -> string.isEmpty()).count();