package unit6;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
public class Stream01 {
public static void main(String[] args) {
// 原理理解
// 创建-加工-获取
// (1)stream流创建
// Collection流
Stream<String> s1 = Arrays.asList("11", "22", "33").stream();
Stream<String> s2 = Arrays.asList("11", "22", "33").parallelStream();
// Map不可以创建流、但是Map中的Entry、key、value可以创建Stream流
Map<Integer, String> map = new HashMap();
Stream<Map.Entry<Integer, String>> s3 = map.entrySet().stream();
Stream<Integer> s4 = map.keySet().stream();
Stream<String> s5 = map.values().stream();
}
}