Wednesday, July 5, 2017

Create one class from another with Stream API

public class User {
public User(

public class UserInfo {
public UserInfo(User log) {

List all = service.getUsers();

List infos = all.stream().map(UserInfo::new).collect(Collectors.toList());

No comments: