package ch.pizzalemon.android.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;

/**
 * Created by cimenmus on 17/10/2017.
 */

public class AddressModel {

    @Expose
    @SerializedName("address_id")
    private String id;

    private String address;
    private boolean isSelected;

    public AddressModel(String address){
        id = "";
        this.address = address;
        isSelected = true;
    }

    private void checkNull(){

        if(id == null)
            id = "";

        if(address == null)
            address = "";
    }

    public static void checkNull(ArrayList<AddressModel> addressModelList){
        for(AddressModel addressModel : addressModelList){
            addressModel.checkNull();
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }
}
