List 转为 Stream
List<String> list = new ArrayList<>();
Stream<String> stream = list.stream();
set 转为 Stream
Set<String> set = new HashSet<>();
Stream<String> stream1 = set.stream();
Map 转为 Stream
Map<String, Integer> map = new HashMap<>();
Set<Map.Entry<String, Integer>> entrySet = map.entrySet();
Stream<Map.Entry<String, Integer>> stream2 = entrySet.stream();
数组 转为 Stream
String[] arr = new String[3];
Stream<String> arr1 = Stream.of(arr);Integer[] arr2 = new Integer[3];
Stream<Integer> arr21 = Stream.of(arr2);