📄 userdto.java~1~
字号:
package loginejb;
import java.io.*;
public class UserDTO
implements Serializable {
public String username;
public String password;
public UserDTO(String username,String password) {
this.username=username;
this.password=password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (! (obj instanceof UserDTO)) {
return false;
}
UserDTO that = (UserDTO) obj;
if (! (that.username == null ? this.username == null :
that.username.equals(this.username))) {
return false;
}
if (! (that.password == null ? this.password == null :
that.password.equals(this.password))) {
return false;
}
return true;
}
public int hashCode() {
int result = 17;
result = 37 * result + this.username.hashCode();
result = 37 * result + this.password.hashCode();
return result;
}
public String toString() {
String returnString = "";
returnString += username;
returnString += ", " + password;
return returnString;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -