/*******************************************************************************
* Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.2-b01-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2007.03.12 at 11:08:34 PM PDT
//
package org.ebayopensource.turmeric.runtime.tests.service1.sample.types1;
import org.ebayopensource.turmeric.runtime.tests.service1.sample.util.TestUtils;
/**
* <p>Java class for Address complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Address">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="city" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="emailAddress" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="postCode" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="state" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="streetName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="streetNumber" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
public class Address {
private String city;
private String emailAddress;
private int postCode;
private String state;
private String streetName;
private int streetNumber;
/**
* Gets the value of the city property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCity() {
return city;
}
/**
* Sets the value of the city property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCity(String value) {
this.city = value;
}
/**
* Gets the value of the emailAddress property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEmailAddress() {
return emailAddress;
}
/**
* Sets the value of the emailAddress property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEmailAddress(String value) {
this.emailAddress = value;
}
/**
* Gets the value of the postCode property.
*
*/
public int getPostCode() {
return postCode;
}
/**
* Sets the value of the postCode property.
*
*/
public void setPostCode(int value) {
this.postCode = value;
}
/**
* Gets the value of the state property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getState() {
return state;
}
/**
* Sets the value of the state property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setState(String value) {
this.state = value;
}
/**
* Gets the value of the streetName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStreetName() {
return streetName;
}
/**
* Sets the value of the streetName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStreetName(String value) {
this.streetName = value;
}
/**
* Gets the value of the streetNumber property.
*
*/
public int getStreetNumber() {
return streetNumber;
}
/**
* Sets the value of the streetNumber property.
*
*/
public void setStreetNumber(int value) {
this.streetNumber = value;
}
public boolean equals(Object other) {
if (other == null) {
return false;
}
if (!(other instanceof Address)) {
return false;
}
Address otherAddr = (Address) other;
boolean result = postCode==otherAddr.postCode
&& streetNumber==otherAddr.streetNumber
&& TestUtils.equals(city, otherAddr.city)
&& TestUtils.equals(emailAddress, otherAddr.emailAddress)
&& TestUtils.equals(state, otherAddr.state)
&& TestUtils.equals(streetName, otherAddr.streetName);
if (!result) {
System.err.println("This: postCode =" + postCode
+ " streetNumber =" + streetNumber
+ " city=" + city
+ " emailAddress=" + emailAddress
+ " state=" + state
+ " streetName=" + streetName);
System.err.println("Other: postCode =" + otherAddr.postCode
+ " streetNumber =" + otherAddr.streetNumber
+ " city=" + otherAddr.city
+ " emailAddress=" + otherAddr.emailAddress
+ " state=" + otherAddr.state
+ " streetName=" + otherAddr.streetName);
}
return result;
}
@Override
public int hashCode() {
int hash = 7;
hash = 31 * hash + postCode;
hash = 31 * hash + streetNumber;
hash = 31 * hash + (city == null ? 0 : city.hashCode());
hash = 31 * hash + (emailAddress == null ? 0 : emailAddress.hashCode());
hash = 31 * hash + (state == null ? 0 : state.hashCode());
hash = 31 * hash + (streetName == null ? 0 : streetName.hashCode());
return hash;
}
}