Java8集合交集操作
1.用到的实体类
User.java
public class User {
private Integer userId;
private String orgId;
private String name;
private String phone;
public User() {
super();
}
public User(Integer userId, String orgId, String name, String phone) {
super();
this.userId = userId;
this.orgId = orgId;
this.name = name;
this.phone = phone;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
@Override
public String toString() {
return "User [userId=" + userId + ", orgId="