1 package org.jboss.cache.data; 2 3 import java.util.List ; 4 5 8 public class Person implements java.io.Serializable { 9 protected String name; 10 protected Address address; 11 12 public void setName(String name) 13 { 14 this.name = name; 15 } 16 17 public String getName() 18 { 19 return this.name; 20 } 21 22 public void setAddress(Address address) 23 { 24 this.address = address; 25 } 26 27 public Address getAddress() 28 { 29 return this.address; 30 } 31 32 public String toString() 33 { 34 StringBuffer buf = new StringBuffer (); 35 buf.append("{Name = " +name); 36 if (address != null) 37 buf.append(", Address = " + address.getSimpleAddress()); 38 buf.append("}\n"); 39 40 return buf.toString(); 41 } 42 43 } 44 | Popular Tags |