beginJsp2.0外文书籍源代码

源代码在线查看: user2.java

软件大小: 228 K
上传用户: GUAIGUAICHENGTI
关键词: beginJsp 2.0 书籍 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.wrox.utilities;
				
				public class User2 implements Comparable 
				{
				  String userName;
				  String phoneNumber;
				
				  public User2(String userName, String phoneNumber) 
				  {
				    this.userName = userName;
				    this.phoneNumber = phoneNumber;
				  }
				
				  public boolean equals(Object o) 
				  {
				    if (o instanceof User2) 
				    {
				      User2 user = (User2) o;
				      if (user.getUsername().equals(this.userName)) return true;
				    }
				    return false;
				  }
				
				  public int compareTo(Object o) 
				  {
				    User2 user = (User2) o;
				    return (this.getUsername().compareTo(user.getUsername()));
				  }
				
				  public void setUsername(String userName) 
				  {
				    this.userName = userName;
				  }
				
				  public String getUsername() 
				  {
				    return userName;
				  }
				
				  public void setPhoneNumber(String phoneNumber) 
				  {
				    this.phoneNumber = phoneNumber;
				  }
				
				  public String getPhoneNumber() 
				  {
				    return phoneNumber;
				  }
				}
							

相关资源