98-hands-on
1. 函数对象
- 生成匿名类的对象名
1. 方法引用
2. Collection抽取一个字段
Stream<Ooxx> ooxxStream = Stream.of(new Ooxx(), new Ooxx(), new Ooxx());
Set<Integer> ids = ooxxStream.map(Ooxx::getId).collect(Collectors.toSet());
Stream<Ooxx> ooxxStream = Stream.of(new Ooxx(), new Ooxx(), new Ooxx());
Set<Integer> ids = ooxxStream.map(Ooxx::getId).collect(Collectors.toSet());