📄 user.java
字号:
/* * 用户 */package chat.common;import java.io.Serializable;/** * * @author Administrator */public class User implements Serializable{ protected String userName; protected String password; public static User createAllUser(){ return new User("所有人",""); } public User(String userName, String password) { this.userName = userName; this.password = password; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String toString(){ return userName; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final User other = (User) obj; if (this.userName != other.userName && (this.userName == null || !this.userName.equals(other.userName))) { return false; } if (this.password != other.password && (this.password == null || !this.password.equals(other.password))) { return false; } return true; } @Override public int hashCode() { int hash = 7; hash = 89 * hash + (this.userName != null ? this.userName.hashCode() : 0); hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0); return hash; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -