// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/EmptyCurrentAddressException.java
// public class EmptyCurrentAddressException extends Exception {
// }
// 
// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/NoAvailableAddressesException.java
// public class NoAvailableAddressesException extends Exception {
// }


import android.location.Address;
import com.khasang.forecast.exceptions.EmptyCurrentAddressException;
import com.khasang.forecast.exceptions.NoAvailableAddressesException;
import java.util.List;
        city = null;
    }

    public LocationParser setAddressesList(List<Address> list) {
        this.list = list;
        return this;
    }

    public LocationParser parseList() throws NoAvailableAddressesException {
        if (list == null || list.size() == 0) {
            throw new NoAvailableAddressesException();
        } else {
            for (Address address : list) {
                if (country == null) {
                    country = address.getCountryName();
                }
                if (region == null) {
                    region = address.getAdminArea();
                }
                if (subRegion == null) {
                    subRegion = address.getSubAdminArea();
                }
                if (city == null) {
                    city = address.getLocality();
                }
            }
        }
        return this;
    }

// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/EmptyCurrentAddressException.java
// public class EmptyCurrentAddressException extends Exception {
// }
// 
// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/NoAvailableAddressesException.java
// public class NoAvailableAddressesException extends Exception {
// }


// Path: Forecast/app/src/main/java/com/khasang/forecast/location/LocationParser.java
import android.location.Address;
import com.khasang.forecast.exceptions.EmptyCurrentAddressException;
import com.khasang.forecast.exceptions.NoAvailableAddressesException;
import java.util.List;

        city = null;
    }

    public LocationParser setAddressesList(List<Address> list) {
        this.list = list;
        return this;
    }

    public LocationParser parseList() throws NoAvailableAddressesException {
        if (list == null || list.size() == 0) {
            throw new NoAvailableAddressesException();
        } else {
            for (Address address : list) {
                if (country == null) {
                    country = address.getCountryName();
                }
                if (region == null) {
                    region = address.getAdminArea();
                }
                if (subRegion == null) {
                    subRegion = address.getSubAdminArea();
                }
                if (city == null) {
                    city = address.getLocality();
                }
            }
        }
        return this;
    }

    public String getAddressLine() throws EmptyCurrentAddressException {