01: /**
02: * Copyright (C) 2001-2004 France Telecom R&D
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package inheritance.horizontal.speedoid;
18:
19: import java.util.Date;
20:
21: /**
22: *
23: * @author S.Chassande-Barrioz
24: */
25: public class Person {
26: private long personid;
27: private String firstname;
28: private String lastname;
29: private Address address;
30: private Date birthdate;
31:
32: public Person() {
33: }
34:
35: public Person(String fn, String ln, Date bd) {
36: this .firstname = fn;
37: this .lastname = ln;
38: this .birthdate = bd;
39: }
40:
41: public Person(String firstname, String lastname, Address address,
42: Date birthdate) {
43: this .firstname = firstname;
44: this .lastname = lastname;
45: this .address = address;
46: this .birthdate = birthdate;
47: }
48:
49: public String getFirstname() {
50: return firstname;
51: }
52:
53: public void setFirstname(String firstname) {
54: this .firstname = firstname;
55: }
56:
57: public String getLastname() {
58: return lastname;
59: }
60:
61: public void setLastname(String lastname) {
62: this .lastname = lastname;
63: }
64:
65: public Address getAddress() {
66: return address;
67: }
68:
69: public void setAddress(Address address) {
70: this .address = address;
71: }
72:
73: public Date getBirthdate() {
74: return birthdate;
75: }
76:
77: public void setBirthdate(Date birthdate) {
78: this .birthdate = birthdate;
79: }
80:
81: public boolean equals(Object o) {
82: return (o instanceof Person)
83: && ((Person) o).personid == personid;
84: }
85: }
|