1 package org.columba.addressbook.model; 19 20 24 public class BasicModelPartial implements IBasicModelPartial { 25 26 protected boolean contact; 27 28 protected String id; 29 30 protected String name; 31 32 protected String description; 33 34 38 public BasicModelPartial(boolean contact) { 39 this.contact = contact; 40 } 41 42 public BasicModelPartial(String id, boolean contact) { 43 if (id == null) 44 throw new IllegalArgumentException ("id == null"); 45 46 this.contact = contact; 47 this.id = id; 48 } 49 50 public BasicModelPartial(String id, String name, boolean contact) { 51 this(id, contact); 52 53 if (name == null) 54 throw new IllegalArgumentException ("name == null"); 55 56 this.name = name; 57 } 58 59 62 public boolean isContact() { 63 return contact; 64 } 65 66 69 public String toString() { 70 return name; 71 } 72 73 public String getId() { 74 return id; 75 } 76 77 public String getName() { 78 return name; 79 } 80 81 public String getDescription() { 82 return description; 83 } 84 85 public void setDescription(String description) { 86 this.description = description; 87 } 88 89 public IBasicModelPartial clone() { 90 IBasicModelPartial p = new BasicModelPartial(id, name, contact); 91 return p; 92 } 93 }
| Popular Tags
|