...
|
...
|
@@ -3,8 +3,7 @@ package com.yohomars.search.model; |
|
|
import com.yoho.tools.common.beans.BaseBean;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @author gris.wang
|
...
|
...
|
@@ -16,7 +15,7 @@ public class SocialUserResponse extends BaseBean { |
|
|
|
|
|
private Integer page;
|
|
|
|
|
|
private List<User> users;
|
|
|
private Set<User> users;
|
|
|
|
|
|
public Integer getRule() {
|
|
|
return rule;
|
...
|
...
|
@@ -34,17 +33,17 @@ public class SocialUserResponse extends BaseBean { |
|
|
this.page = page;
|
|
|
}
|
|
|
|
|
|
public List<User> getUsers() {
|
|
|
public Set<User> getUsers() {
|
|
|
return users;
|
|
|
}
|
|
|
|
|
|
public void setUsers(List<User> users) {
|
|
|
public void setUsers(Set<User> users) {
|
|
|
this.users = users;
|
|
|
}
|
|
|
|
|
|
public void addUsers(List<User> users){
|
|
|
public void addUsers(Collection<User> users){
|
|
|
if(CollectionUtils.isEmpty(this.users)){
|
|
|
this.users = new ArrayList<>();
|
|
|
this.users = new HashSet<>();
|
|
|
}
|
|
|
this.users.addAll(users);
|
|
|
}
|
...
|
...
|
@@ -79,5 +78,28 @@ public class SocialUserResponse extends BaseBean { |
|
|
public void setHeadPic(String headPic) {
|
|
|
this.headPic = headPic;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public boolean equals(Object obj) {
|
|
|
if(!(obj instanceof User)){
|
|
|
return false;
|
|
|
}
|
|
|
if(obj == this){
|
|
|
return true;
|
|
|
}
|
|
|
User that = (User)obj;
|
|
|
return that.getUid().equals(this.getUid())
|
|
|
&& that.getNickName().equals(this.getNickName())
|
|
|
&& that.getHeadPic().equals(this.getHeadPic());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int hashCode() {
|
|
|
int hash = 17;
|
|
|
hash = hash * 31 + getNickName().hashCode();
|
|
|
hash = hash * 31 + getHeadPic().hashCode();
|
|
|
hash = hash * 31 + getUid();
|
|
|
return hash;
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|