?? person.java
字號:
/* * Person.java * * Created on June 10, 2005, 2:03 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package ch02.pojo;import java.io.Serializable;/** * * @author kevin */public abstract class Person implements IPerson, Serializable{ private String personID; private String firstName; private String lastName; private String address; public boolean dirty = false; /** Creates a new instance of Person */ public Person() { } public void setPersonID(String personID){ this.personID = personID; } public String getPersonID(){ return personID; } public void setFirstName(String firstName){ this.firstName = firstName; dirty(); } public String getFirstName(){ return firstName; } public void setLastName(String lastName){ this.lastName = lastName; dirty(); } public String getLastName(){ return lastName; } public void setAddress(String address){ this.address = address; dirty(); } public String getAddress(){ return address; } protected void dirty(){ this.dirty = true; } public boolean isDirty(){ return dirty; } public boolean equals(Object o){ if(!(o instanceof Person))return false; Person person = (Person)o; if(person.personID.equals(personID))return true; return false; } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -