package model;
public class User {
private String userId;
private String userName;
public User() {
}
public User(String userId, String userName) {
this.userId = userId;
this.userName = userName;
}
@Override
public String toString() {
return "User{" +
"userId='" + userId + '\'' +
", userName='" + userName + '\'' +
'}';
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj instanceof User) {
User user = (User) obj;
if (user.getUserId().equals(this.userId) && user.getUserName().equals(this.userName)) {
return true;
}
}
return false;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}