/*
* Copyleft Flisol 2015.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.flisolsaocarlos.flisolapp.model;
public class Address {
private String street;
private int number;
private String district;
private String city;
private String state;
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
@Override
public String toString() {
return "Address{" + "street=" + street + ", number=" + number + ", district=" + district + ", city=" + city + ", state=" + state + '}';
}
public String formattedAddress() {
StringBuilder addressBuilder = new StringBuilder();
addressBuilder.append(street).append(", ").append(number).append(" , ").append(district).append(", ").append(city).append(" - ").append(state);
return addressBuilder.toString();
}
}