userdto.java~1~
来自「Spring +Web 的完整 MyEclipse 项目源码,使用者可以作为入门」· JAVA~1~ 代码 · 共 64 行
JAVA~1~
64 行
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 + =
减小字号Ctrl + -
显示快捷键?