
org.glassfish.jersey.examples.xmlmoxy.beans.Address Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.glassfish.jersey.examples.xmlmoxy.beans;
/**
*
* @author Jakub Podlesak
*/
public class Address {
private String street;
private String city;
public Address(){}
public Address(String street, String city) {
this.street = street;
this.city = city;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Address other = (Address) obj;
if ((this.street == null) ? (other.street != null) : !this.street.equals(other.street)) {
return false;
}
if ((this.city == null) ? (other.city != null) : !this.city.equals(other.city)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 3;
hash = 29 * hash + (this.street != null ? this.street.hashCode() : 0);
hash = 29 * hash + (this.city != null ? this.city.hashCode() : 0);
return hash;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy