https://blog.youkuaiyun.com/bitcarmanlee/article/details/78492164
distinct :::::截然不同的
List<String> alpha = Arrays.asList("a","b","c","d");
List<String> collect = alpha.stream().map(String :: toUpperCase).collect(Collectors.toList());
stream不会修改数据源,总是返回新的stream;
map操作。map算是最常用的一种操作了,遍历原stream中的元素,转换后构成新的stream:
stream本身并不存储数据,数据是存储在对应的collection里,或者在需要的时候才生成的;
collect()方法可以对stream中的元素进行各种处理后,得到stream中元素的值。并且Collectors接口提供了很方便的创建Collector对象的工厂方法。