1 package org.columba.addressbook.facade; 19 20 21 25 public class ContactItem extends HeaderItem implements IContactItem { 26 27 private String firstName; 28 private String lastName; 29 private String address; 30 31 public ContactItem() { 32 super(true); 33 } 34 35 public ContactItem(String id) { 36 super(id, true); 37 } 38 39 47 public ContactItem(String id, String name, String firstName, String lastName, String address) { 48 super(id, true); 49 50 if ( name == null ) throw new IllegalArgumentException ("name == null"); 51 if ( address == null ) throw new IllegalArgumentException ("address == null"); 52 53 this.firstName = firstName; 54 this.lastName = lastName; 55 this.address = address; 56 57 setName(name); 58 59 } 60 61 public String getFirstName() { 62 return firstName; 63 } 64 65 public String getLastName() { 66 return lastName; 67 } 68 69 public String getEmailAddress() { 70 return address; 71 } 72 73 74 public void setFirstName(String firstName) { 75 this.firstName = firstName; 76 } 77 78 public void setLastName(String lastName) { 79 this.lastName = lastName; 80 } 81 82 public void setEmailAddress(String emailAddress) { 83 this.address = emailAddress; 84 } 85 } 86 | Popular Tags |