1 16 package org.apache.commons.betwixt.io.read; 17 18 24 public class HouseBean { 25 26 private CompassPoint facing; 27 private AddressBean address; 28 private PersonBean householder; 29 private boolean isTenant; 30 31 public HouseBean() {} 32 33 public AddressBean getAddress() { 34 return address; 35 } 36 37 public void setAddress(AddressBean address) { 38 this.address = address; 39 } 40 41 public PersonBean getHouseholder() { 42 return householder; 43 } 44 45 public void setHouseholder(PersonBean householder) { 46 this.householder = householder; 47 } 48 49 public boolean isTenant() { 50 return isTenant; 51 } 52 53 public void setTenant(boolean isTenant) { 54 this.isTenant = isTenant; 55 } 56 57 public CompassPoint getFacing() { 58 return facing; 59 } 60 61 public void setFacing(CompassPoint facing) { 62 this.facing = facing; 63 } 64 65 public String toString() { 66 return "[" + this.getClass().getName() + ": address=" + address + " householder=" + householder 67 + " facing=" + facing + " tenant=" + isTenant + "]"; 68 } 69 70 public boolean equals( Object obj ) { 71 if ( obj == null ) return false; 72 return this.hashCode() == obj.hashCode(); 73 } 74 75 public int hashCode() { 76 return toString().hashCode(); 77 } 78 } 79 | Popular Tags |