⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user.java

📁 网上商城源代码!实现了书店的列表和增加
💻 JAVA
字号:
package bookstore.model.eneity;import java.io.Serializable;public class User implements Serializable {	private int id;	private String name;	private String password;	private String address;	private String postcode;	private String email;	private String phone;	private String city;	private int userType;		public User(){ }	public User(String name,String password,String address,String postcode,			String email,String phone,String city,int userType){		this.name=name;		this.password=password;		this.address=address;		this.postcode=postcode;		this.email=email;		this.phone=phone;		this.city=city;		this.userType=userType;	}	public String getAddress() {		return address;	}	public void setAddress(String address) {		this.address = address;	}	public String getCity() {		return city;	}	public void setCity(String city) {		this.city = city;	}	public String getEmail() {		return email;	}	public void setEmail(String email) {		this.email = email;	}	public Integer getId() {		return id;	}	public void setId(Integer id) {		this.id = id;	}	public String getName() {		return name;	}	public void setName(String name) {		this.name = name;	}	public String getPassword() {		return password;	}	public void setPassword(String password) {		this.password = password;	}	public String getPhone() {		return phone;	}	public void setPhone(String phone) {		this.phone = phone;	}	public String getPostcode() {		return postcode;	}	public void setPostcode(String postcode) {		this.postcode = postcode;	}	public Integer getUserType() {		return userType;	}	public void setUserType(Integer userType) {		this.userType = userType;	}	public boolean equals(Object obj) {		if(!(obj instanceof User) )			return false;		 User u=(User)obj;		return u.getName().equals(name)||u.getId().equals(id);			}		public int hashCode() {		    return name.hashCode()^id;	}	public String toString(){		return getName();	}	   }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -