/*******************************************************************************
* 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
*******************************************************************************/
package org.ebayopensource.turmeric.runtime.binding;
/**
* <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;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((city == null) ? 0 : city.hashCode());
result = prime * result
+ ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result + postCode;
result = prime * result + ((state == null) ? 0 : state.hashCode());
result = prime * result
+ ((streetName == null) ? 0 : streetName.hashCode());
result = prime * result + streetNumber;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Address other = (Address) obj;
if (city == null) {
if (other.city != null)
return false;
} else if (!city.equals(other.city))
return false;
if (emailAddress == null) {
if (other.emailAddress != null)
return false;
} else if (!emailAddress.equals(other.emailAddress))
return false;
if (postCode != other.postCode)
return false;
if (state == null) {
if (other.state != null)
return false;
} else if (!state.equals(other.state))
return false;
if (streetName == null) {
if (other.streetName != null)
return false;
} else if (!streetName.equals(other.streetName))
return false;
if (streetNumber != other.streetNumber)
return false;
return true;
}
}