1 package net.sourceforge.jgeocoder; 2 3 import java.io.Serializable; 4 import java.util.Map; 5 6 import org.apache.commons.lang.builder.EqualsBuilder; 7 import org.apache.commons.lang.builder.HashCodeBuilder; 8 import org.apache.commons.lang.builder.ToStringBuilder; 9 import org.apache.commons.lang.builder.ToStringStyle; 10 /*** 11 * TODO javadocs me 12 * @author jliang 13 * 14 */ 15 public class JGeocodeAddress implements Serializable{ 16 17 private static final long serialVersionUID = 20080613L; 18 private Map<AddressComponent, String> _parsedAddr = null; 19 private Map<AddressComponent, String> _normalizedAddr = null; 20 private Map<AddressComponent, String> _geocodedAddr = null; 21 private GeocodeAcuracy _acuracy = GeocodeAcuracy.UNKNOWN; 22 public Map<AddressComponent, String> getParsedAddr() { 23 return _parsedAddr; 24 } 25 public void setParsedAddr(Map<AddressComponent, String> parsedAddr) { 26 _parsedAddr = parsedAddr; 27 } 28 public Map<AddressComponent, String> getNormalizedAddr() { 29 return _normalizedAddr; 30 } 31 public void setNormalizedAddr(Map<AddressComponent, String> normalizedAddr) { 32 _normalizedAddr = normalizedAddr; 33 } 34 public Map<AddressComponent, String> getGeocodedAddr() { 35 return _geocodedAddr; 36 } 37 public void setGeocodedAddr(Map<AddressComponent, String> geocodedAddr) { 38 _geocodedAddr = geocodedAddr; 39 } 40 public GeocodeAcuracy getAcuracy() { 41 return _acuracy; 42 } 43 public void setAcuracy(GeocodeAcuracy acuracy) { 44 _acuracy = acuracy; 45 } 46 47 public String toStringMultiLine(){ 48 return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); 49 } 50 51 @Override 52 public String toString() { 53 return ToStringBuilder.reflectionToString(this); 54 } 55 56 @Override 57 public boolean equals(Object obj) { 58 return EqualsBuilder.reflectionEquals(this, obj); 59 } 60 61 @Override 62 public int hashCode() { 63 return HashCodeBuilder.reflectionHashCode(this); 64 } 65 }