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

📄 register.java

📁 模拟的土豆网视频网站
💻 JAVA
字号:
package cn.myvideosite.data.model.bean;

public class Register implements Comparable<Object>{

	
	     private int id;
	     private String username;          
	     private String password;
	     private String password2;
	     private String email;
	     private String sex;
	     private String birthday;
	     private String location;
		
	     public Register() {
			super();
			
		 }
	     public Register(String username,String password,String password2, String email,
				 String sex , String birthday,  String location) {
			super();
			this.birthday = birthday;
			this.email = email;
			this.location = location;
			this.password = password;
			this.password2 = password2;
			this.sex = sex;
			this.username = username;
		}
		 public Register(int id,String username,String password,String password2, String email,
				 String sex , String birthday,  String location) {
			super();
			this.birthday = birthday;
			this.id = id;
			this.email = email;
			this.location = location;
			this.password = password;
			this.password2 = password2;
			this.sex = sex;
			this.username = username;
		}
		public int getID() {
			return id;
		}
		public void setID(int id) {
			this.id = id;
		}
		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 String getPassword2() {
			return password2;
		}
		public void setPassword2(String password2) {
			this.password2 = password2;
		}
		public String getEmail() {
			return email;
		}
		public void setEmail(String email) {
			this.email = email;
		}
		public String getSex() {
			return sex;
		}
		public void setSex(String sex) {
			this.sex = sex;
		}
		public String getBirthday() {
			return birthday;
		}
		public void setBirthday(String birthday) {
			this.birthday = birthday;
		}
		public String getLocation() {
			return location;
		}
		public void setLocation(String location) {
			this.location = location;
		}
		public String toString(){
			return new StringBuffer("id=").append(id).append(", username=").append(username)
			.toString();
		}
		
		public int compareTo(Object o) {
			Register other=(Register)o;
			if(id<other.id)return -1;
			else if(id>other.id)return 1;
			else return 0;
			
		}
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result
					+ ((birthday == null) ? 0 : birthday.hashCode());
			result = prime * result + ((email == null) ? 0 : email.hashCode());
			result = prime * result + id;
			result = prime * result
					+ ((location == null) ? 0 : location.hashCode());
			result = prime * result
					+ ((password == null) ? 0 : password.hashCode());
			result = prime * result
					+ ((password2 == null) ? 0 : password2.hashCode());
			result = prime * result + ((sex == null) ? 0 : sex.hashCode());
			result = prime * result
					+ ((username == null) ? 0 : username.hashCode());
			return result;
		}
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Register other = (Register) obj;
			if (birthday == null) {
				if (other.birthday != null)
					return false;
			} else if (!birthday.equals(other.birthday))
				return false;
			if (email == null) {
				if (other.email != null)
					return false;
			} else if (!email.equals(other.email))
				return false;
			if (id != other.id)
				return false;
			if (location == null) {
				if (other.location != null)
					return false;
			} else if (!location.equals(other.location))
				return false;
			if (password == null) {
				if (other.password != null)
					return false;
			} else if (!password.equals(other.password))
				return false;
			if (password2 == null) {
				if (other.password2 != null)
					return false;
			} else if (!password2.equals(other.password2))
				return false;
			if (sex == null) {
				if (other.sex != null)
					return false;
			} else if (!sex.equals(other.sex))
				return false;
			if (username == null) {
				if (other.username != null)
					return false;
			} else if (!username.equals(other.username))
				return false;
			return true;
		}
		
	     
	    
}

⌨️ 快捷键说明

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