01: package com.acme.contacts;
02:
03: import java.util.List;
04:
05: public class Person {
06: private String firstName;
07: private String lastName;
08: private List addresses;
09:
10: public String getFirstName() {
11: return firstName;
12: }
13:
14: public void setFirstName(String firstName) {
15: this .firstName = firstName;
16: }
17:
18: public String getLastName() {
19: return lastName;
20: }
21:
22: public void setLastName(String lastName) {
23: this .lastName = lastName;
24: }
25:
26: public List getAddresses() {
27: return addresses;
28: }
29:
30: public void setAddresses(List addresses) {
31: this .addresses = addresses;
32: }
33:
34: public String toString() {
35: return "[Person: " + lastName + ", " + firstName + addresses
36: + "]";
37: }
38: }
|